   single casted line(?)
  I just downloaded wxWidgets and I was browsing through some of the files before building them.  I noticed some code such as this...static intJPEGEncode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s){JPEGState *sp = JState(tif);tsize_t nrows;JSAMPROW bufptr[1];(void) s;  //what is the purpose of this?//[...]//another example...static intTIFFjpeg_tables_dest(JPEGState* sp, TIFF* tif){(void) tif; //what is the purpose of this?//[...]Where tsample_t is an unsigned short.  Is this some kind of hint or compiler optimization?  I've never seen this (void)x notation before.  There are similar lines that "cast" to other types.   
  Basically it's there to shut up warnings about unused function arguments, that's it.   ;  Probably to make sure there are no "unused variable" errors.(void) means ignore the value.For example one of the implemenations of assert I've seen is:#define assert(x) x ? (void)0 : _SomeAssertThingie(#x,__FILE__,__LINE__);  Interesting thanks.  I had my my compiler's warning level low enough such that it wouldn't show up regardless.   ;Quote:Original post by dx elliotInteresting thanks.  I had my warning level low enough such that I never even received this warning anyways.Increase it! Warnings (despite being annoying) are your friends. I prefer getting lots of stupid warnings rather than letting something important slip through( the only exception to ths is comparison between signed and unsigned types, but near enough).Learn to disable the warnings you don't need, not just blank them all.   