Subject: | Compiler warnings |
Hello,
While compiling Geo:/Shapelib 0.18, I saw quite a bunch of warnings,
some of them could indicate potential bugs (see attached file).
I thought you may be interested.
Regards
Running [/usr/bin/perl5.8.5 Makefile.PL ]...
Checking if your kit is complete...
Looks good
MakeMaker (v6.30)
Writing Makefile for Geo::Shapelib::shputils
Writing Makefile for Geo::Shapelib
Running [/usr/bin/make UNINST=1]...
cp Shapelib.pm blib/lib/Geo/Shapelib.pm
AutoSplitting blib/lib/Geo/Shapelib.pm (blib/lib/auto/Geo/Shapelib)
cd shapelib && /usr/bin/make LIBPERL_A="libperl.a" LINKTYPE="dynamic" OPTIMIZE="-O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro" PREFIX="/usr" PASTHRU_DEFINE="" PASTHRU_INC=""
make[1]: Entering directory `/home/cpanplus/.cpanplus/5.8.5/build/Geo-Shapelib-0.18/shapelib'
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG dbfadd.c
dbfadd.c: In function `main':
dbfadd.c:110: warning: implicit declaration of function `strcmp'
dbfadd.c: At top level:
dbfadd.c:60: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG dbfcreate.c
dbfcreate.c:57: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG dbfdump.c
dbfdump.c: In function `main':
dbfdump.c:139: warning: 'pszTypeName' might be used uninitialized in this function
dbfdump.c: At top level:
dbfdump.c:66: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG dbfopen.c
dbfopen.c:188: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shpadd.c
shpadd.c:78: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shpcreate.c
shpcreate.c: In function `main':
shpcreate.c:71: warning: implicit declaration of function `exit'
shpcreate.c:77: warning: implicit declaration of function `strcmp'
shpcreate.c: At top level:
shpcreate.c:54: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shpdump.c
shpdump.c: In function `main':
shpdump.c:83: warning: implicit declaration of function `strcmp'
shpdump.c:96: warning: implicit declaration of function `exit'
shpdump.c: At top level:
shpdump.c:70: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shpopen.c
shpopen.c:164: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shprewind.c
shprewind.c: In function `main':
shprewind.c:64: warning: implicit declaration of function `exit'
shprewind.c:96: warning: unused variable `j'
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shptest.c
shptest.c:61: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shptree.c
shptree.c:69: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shptreedump.c
shptreedump.c: In function `main':
shptreedump.c:109: warning: implicit declaration of function `strcmp'
shptreedump.c: In function `SHPTreeNodeDump':
shptreedump.c:285: warning: implicit declaration of function `strcpy'
shptreedump.c:286: warning: implicit declaration of function `strlen'
shptreedump.c:287: warning: implicit declaration of function `strcat'
shptreedump.c: At top level:
shptreedump.c:64: warning: 'rcsid' defined but not used
gcc -c -I/usr/include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb -Wall -DDEBUG shputils.c
shputils.c: In function `showitems':
shputils.c:694: warning: int format, long int arg (arg 2)
shputils.c:694: warning: int format, long int arg (arg 3)
shputils.c:695: warning: int format, long int arg (arg 2)
shputils.c: In function `selectrec':
shputils.c:741: warning: suggest explicit braces to avoid ambiguous `else'
shputils.c: At top level:
shputils.c:779: warning: return type defaults to `int'
shputils.c: In function `clip_boundary':
shputils.c:827: warning: suggest explicit braces to avoid ambiguous `else'
shputils.c:855:54: warning: "/*" within comment
shputils.c:865:50: warning: "/*" within comment
shputils.c: At top level:
shputils.c:920: warning: return type defaults to `int'
shputils.c: In function `findunit':
shputils.c:926: warning: missing braces around initializer
shputils.c:926: warning: (near initialization for `unitkeytab[0]')
shputils.c: In function `check_theme_bnd':
shputils.c:776: warning: control reaches end of non-void function
shputils.c: In function `clip_boundary':
shputils.c:883: warning: control reaches end of non-void function
shputils.c: In function `showitems':
shputils.c:720: warning: enumeration value `FTLogical' not handled in switch
shputils.c:720: warning: enumeration value `FTInvalid' not handled in switch
shputils.c: In function `main':
shputils.c:402: warning: enumeration value `FTLogical' not handled in switch
shputils.c:402: warning: enumeration value `FTInvalid' not handled in switch
shputils.c: At top level:
shputils.c:85: warning: 'rcsid' defined but not used
ar cr libshp.a dbfadd.o dbfcreate.o dbfdump.o dbfopen.o shpadd.o shpcreate.o shpdump.o shpopen.o shprewind.o shptest.o shptree.o shptreedump.o shputils.o
: libshp.a
rm -rf ../blib/arch/auto/Geo/Shapelib/shputils/shputils.a
/usr/bin/ar cr ../blib/arch/auto/Geo/Shapelib/shputils/shputils.a shputils.o && : ../blib/arch/auto/Geo/Shapelib/shputils/shputils.a
chmod 755 ../blib/arch/auto/Geo/Shapelib/shputils/shputils.a
make[1]: Leaving directory `/home/cpanplus/.cpanplus/5.8.5/build/Geo-Shapelib-0.18/shapelib'
make[1]: Entering directory `/home/cpanplus/.cpanplus/5.8.5/build/Geo-Shapelib-0.18/shapelib'
make[1]: Leaving directory `/home/cpanplus/.cpanplus/5.8.5/build/Geo-Shapelib-0.18/shapelib'
/usr/bin/perl5.8.5 /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap -typemap typemap Shapelib.xs > Shapelib.xsc && mv Shapelib.xsc Shapelib.c
Please specify prototyping behavior for Shapelib.xs (see perlxs manual)
gcc -c -I./ -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_DISABLE_PMC -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -DVERSION=\"0.18\" -DXS_VERSION=\"0.18\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -ggdb Shapelib.c
Running Mkbootstrap for Geo::Shapelib ()
chmod 644 Shapelib.bs
rm -f blib/arch/auto/Geo/Shapelib/Shapelib.so
gcc -shared -L/usr/local/lib Shapelib.o -o blib/arch/auto/Geo/Shapelib/Shapelib.so shapelib/libshp.a \
\
chmod 755 blib/arch/auto/Geo/Shapelib/Shapelib.so
cp Shapelib.bs blib/arch/auto/Geo/Shapelib/Shapelib.bs
chmod 644 blib/arch/auto/Geo/Shapelib/Shapelib.bs