home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!hal.com!decwrl!csus.edu!netcom.com!ljensen
- From: ljensen@netcom.com (Colin Jensen)
- Newsgroups: comp.os.os2.programmer
- Subject: Re: Why I will choose Borland
- Message-ID: <1993Jan23.192929.21891@netcom.com>
- Date: 23 Jan 93 19:29:29 GMT
- References: <727547182.AA07615@tdkt.kksys.com>
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- Lines: 28
-
- In article <727547182.AA07615@tdkt.kksys.com> Scott.Jibben@f115.n282.z1.tdkt.kksys.com (Scott Jibben) writes:
- > >>The most common example is disabling the
- > >>parameter-not-used warning on vectored procedures...
- >
- >DM>And, fwiw, you can shut up those messages by casting the parameter to
- > >void:
- >
- >Isn't it possible to turn off those warnings via a #pragma or something
- >like this:
- >
- >void foo( int ) // note: I removed the variable name.
- >{
- > printf( "I like C.\n" );
- > return
- >}
-
- You program should really say
- printf("I like C++.\n");
- since your method of shutting up warnings is only legal in C++, and is
- completly illegal in ANSI-C.
-
- The most portable way to shut up the not-used warnings in ANSI-C
- is the cast to void trick which works for all of the compilers I have
- ever used.
-
- --
- Colin Jensen
- ljensen@netcom.netcom.com cjensen@ampex.com
-