Path: utzoo!utgpu!watserv1!watmath!att!westmark!mole-end!mat From: mat@mole-end.UUCP (Mark A Terribile) Newsgroups: comp.lang.c++ Subject: Re: Can I turn off specific "not used" warnings in cfront? Summary: The right way to do it ... Message-ID: <446@mole-end.UUCP> Date: 15 Nov 90 10:17:08 GMT References: <11704@spool.cs.wisc.edu> <1084@ntpal.UUCP> Organization: mole-end--private system. admin: mole-end!newtnews Lines: 53 > Yes! You can eliminate the "not used" warnings! Below is a simple > example: > void funcname( > int x; > int y; > int z ) > { > x,y; // this will eliminate the "not used" warnings > > printf( "%d", z ); > > } Yes, it will eliminate the warnings, but it won't compile. I think you mean void funcname( int x, int y, int z ) { x,y; // this will eliminate the "not used" warnings printf( "%d", z ); } but it's the wrong way to do it. (It's also a bear of a way to format code.) The right way is to use the language as it is meant to be used: void funcname( int, int, int z ) { cout << z; } (Note that we also get rid of the incompletely type-checked printf() .) What if you need the `documentation' value of the x and y ? You can always place a prototype in front of the function: void funcname( int x, int y, int z ); void funcname( int, int, int z ) { . . . -- (This man's opinions are his own.) From mole-end Mark Terribile