From: Alan W. I. <ir...@be...> - 2011-10-14 08:37:40
|
On 2011-10-14 08:26+0100 Andrew Ross wrote: > I've committed the first tranche of fixes for compiler warnings. > > For reference I've been testing with > CFLAGS="-O3 -std=c99 -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wconversion -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings" > CCFLAGS=-O3 -fvisibility=hidden -std=c++98 -pedantic -Wall -Wextra > FFLAGS=-O3 -fvisibility=hidden -pedantic -Wall -Wextra > > When required I have (by hand) added -D_POSIX_C_SOURCE=1 to the flags for > specific files (e.g. xwin.c) in order to compile. > > So far this is just the easy to fix issues (function prototypes, missing > braces, missing const for char *, shadowed variables, unused functions.) > This is quite intrusive, so please test well. Ordinary compile flags CXXFLAGS=-O3 -fvisibility=hidden CFLAGS=-O3 -fvisibility=hidden FFLAGS=-O3 now give the following warning: /home/software/plplot_svn/HEAD/plplot_cmake_qt/src/plargs.c: In function ‘ProcessOpt’: /home/software/plplot_svn/HEAD/plplot_cmake_qt/src/plargs.c:1119: warning: assignment discards qualifiers from pointer target type which wasn't there before. Other than that as of revision 11970 (my style changes on top of your compiler warning fixes up to just before that revision), ctest -j4 shows no obvious issues. By the way, I just discovered that "parallel test" option -j4 really does speed ctest execution on a machine with two physical processors. > There will be more to come. Good work, Andrew! Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |