From: <and...@us...> - 2011-10-21 10:00:36
|
Revision: 11995 http://plplot.svn.sourceforge.net/plplot/?rev=11995&view=rev Author: andrewross Date: 2011-10-21 10:00:26 +0000 (Fri, 21 Oct 2011) Log Message: ----------- Yet more code cleaning to remove compiler warnings. Modified Paths: -------------- trunk/bindings/tk/plr.c trunk/drivers/qt.cpp trunk/drivers/wxwidgets_gc.cpp Modified: trunk/bindings/tk/plr.c =================================================================== --- trunk/bindings/tk/plr.c 2011-10-21 07:00:50 UTC (rev 11994) +++ trunk/bindings/tk/plr.c 2011-10-21 10:00:26 UTC (rev 11995) @@ -47,10 +47,14 @@ // Some wrapper macros to return (-1) on error +// Note we use %lu and an explicit cast to unsigned long to print size_t pointers. +// C99 adds %zd as an explicit format specifier for size_t but this is not yet +// fully adopted. + #define plr_rd( code ) \ if ( code ) { fprintf( stderr, \ - "Unable to read from %s in %s at line %d, bytecount %ld\n", \ - plr->iodev->typeName, __FILE__, __LINE__, plr->pdfs->bp ); \ + "Unable to read from %s in %s at line %d, bytecount %lu\n", \ + plr->iodev->typeName, __FILE__, __LINE__, (unsigned long) plr->pdfs->bp ); \ return -1; } #define plr_cmd( code ) \ @@ -59,8 +63,8 @@ // Error termination #define barf( msg ) \ - { fprintf( stderr, "%s\nCommand code: %d, byte count: %ld\n", \ - msg, csave, plr->pdfs->bp ); return -1; } + { fprintf( stderr, "%s\nCommand code: %d, byte count: %lu\n", \ + msg, csave, (unsigned long) plr->pdfs->bp ); return -1; } // Static function prototypes. Modified: trunk/drivers/qt.cpp =================================================================== --- trunk/drivers/qt.cpp 2011-10-21 07:00:50 UTC (rev 11994) +++ trunk/drivers/qt.cpp 2011-10-21 10:00:26 UTC (rev 11995) @@ -1041,8 +1041,6 @@ { double downscale; - int argc = 0; - char argv[] = { '\0' }; if ( qt_family_check( pls ) ) { return; @@ -1677,7 +1675,7 @@ closeQtApp(); } -void plD_eop_extqt( PLStream *pls ) +void plD_eop_extqt( PLStream * /* pls */ ) { } @@ -1802,7 +1800,7 @@ pls->family = true; } -void plD_bop_memqt( PLStream *pls ) +void plD_bop_memqt( PLStream * /* pls */ ) { // Do nothing to preserve user data } Modified: trunk/drivers/wxwidgets_gc.cpp =================================================================== --- trunk/drivers/wxwidgets_gc.cpp 2011-10-21 07:00:50 UTC (rev 11994) +++ trunk/drivers/wxwidgets_gc.cpp 2011-10-21 10:00:26 UTC (rev 11995) @@ -345,6 +345,9 @@ // Log_Verbose( "%s", __FUNCTION__ ); #ifdef __WXGTK__ + // Cast function parameters to (void) to silence compiler warnings about unused parameters + (void) x; + (void) y; // The GetPixel method is incredible slow for wxGTK. Therefore we set the colour // always to the background color, since this is the case anyway 99% of the time. PLINT bgr, bgg, bgb; // red, green, blue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |