wanglongqi / pdf2djvu

Automatically exported from code.google.com/p/pdf2djvu
0 stars 2 forks source link

warnings during build using -Wall -O3 #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I just submitted a review for fedora package for pdf2djvu. During build I
got number of warnings using the flags we recommend. These warnings are
there in attached log and corresponding flags also. May some dev looks into
the matter and comes up with fix for them.

Another question is why you using -O3 optimization ?

Thanks,
Rakesh Pandit
Fedora Package Maintainer

Executing(%prep): /bin/sh -e /home/rpmbuild/rpm/tmp/rpm-tmp.GJh7fJ
+ umask 022
+ cd /home/rpmbuild/rpm/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/rpmbuild/rpm/BUILD
+ rm -rf pdf2djvu-0.4.13
+ /usr/bin/gzip -dc /home/rpmbuild/rpm/SOURCES/pdf2djvu_0.4.13.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd pdf2djvu-0.4.13
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #1 (pdf2djvu-strerror.patch):'
Patch #1 (pdf2djvu-strerror.patch):
+ /bin/cat /home/rpmbuild/rpm/SOURCES/pdf2djvu-strerror.patch
+ /usr/bin/patch -s -p1 -b --suffix .stderr --fuzz=0
+ exit 0
Executing(%build): /bin/sh -e /home/rpmbuild/rpm/tmp/rpm-tmp.QitgGE
+ umask 022
+ cd /home/rpmbuild/rpm/BUILD
+ cd pdf2djvu-0.4.13
+ LANG=C
+ export LANG
+ unset DISPLAY
+ make -j3
./tools/get-pdf2djvu-version > version.hh || ( rm -f version.hh; false )
g++ -Wall -O3 -pthread -I/usr/include/poppler   -DPOPPLER_VERSION=807 
-DDJVULIBRE_BIN_PATH="\"/usr/bin\""   -c -o compoppler.o compoppler.cc
g++ -Wall -O3 -pthread -I/usr/include/poppler   -DPOPPLER_VERSION=807 
-DDJVULIBRE_BIN_PATH="\"/usr/bin\""   -c -o debug.o debug.cc
g++ -Wall -O3 -pthread -I/usr/include/poppler   -DPOPPLER_VERSION=807 
-DDJVULIBRE_BIN_PATH="\"/usr/bin\""   -c -o config.o config.cc
g++ -Wall -O3 -pthread -I/usr/include/poppler   -DPOPPLER_VERSION=807 
-DDJVULIBRE_BIN_PATH="\"/usr/bin\""   -c -o system.o system.cc
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from compoppler.cc:16:
/usr/include/poppler/Object.h: In member function 'int
Object::arrayGetLength()':
/usr/include/poppler/Object.h:244: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::arrayAdd(Object*)':
/usr/include/poppler/Object.h:247: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::arrayGet(int, Object*)':
/usr/include/poppler/Object.h:250: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::arrayGetNF(int, Object*)':
/usr/include/poppler/Object.h:253: warning: deprecated conversion from
string constant to 'char*'
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from compoppler.cc:16:
/usr/include/poppler/Object.h: In member function 'int
Object::dictGetLength()':
/usr/include/poppler/Object.h:262: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::dictAdd(char*, Object*)':
/usr/include/poppler/Object.h:265: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::dictSet(char*, Object*)':
/usr/include/poppler/Object.h:268: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'GBool
Object::dictIs(char*)':
/usr/include/poppler/Object.h:271: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictLookup(char*, Object*)':
/usr/include/poppler/Object.h:277: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictLookupNF(char*, Object*)':
/usr/include/poppler/Object.h:280: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'char*
Object::dictGetKey(int)':
/usr/include/poppler/Object.h:283: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictGetVal(int, Object*)':
/usr/include/poppler/Object.h:286: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictGetValNF(int, Object*)':
/usr/include/poppler/Object.h:289: warning: deprecated conversion from
string constant to 'char*'
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from compoppler.cc:16:
/usr/include/poppler/Object.h: In member function 'GBool
Object::streamIs(char*)':
/usr/include/poppler/Object.h:298: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void Object::streamReset()':
/usr/include/poppler/Object.h:304: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void Object::streamClose()':
/usr/include/poppler/Object.h:307: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'int
Object::streamGetChar()':
/usr/include/poppler/Object.h:310: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'int
Object::streamLookChar()':
/usr/include/poppler/Object.h:313: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'char*
Object::streamGetLine(char*, int)':
/usr/include/poppler/Object.h:316: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Guint
Object::streamGetPos()':
/usr/include/poppler/Object.h:319: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::streamSetPos(Guint, int)':
/usr/include/poppler/Object.h:322: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Dict*
Object::streamGetDict()':
/usr/include/poppler/Object.h:325: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/UTF8.h: At global scope:
/usr/include/poppler/UTF8.h:45: warning: 'int mapUCS2(Unicode, char*, int)'
defined but not used
g++ -Wall -O3 -pthread -I/usr/include/poppler   -DPOPPLER_VERSION=807 
-DDJVULIBRE_BIN_PATH="\"/usr/bin\""   -c -o sexpr.o sexpr.cc
g++ -Wall -O3 -pthread -I/usr/include/poppler   -DPOPPLER_VERSION=807 
-DDJVULIBRE_BIN_PATH="\"/usr/bin\""   -c -o quantizer.o quantizer.cc
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from quantizer.hh:13,
                 from quantizer.cc:8:
/usr/include/poppler/Object.h: In member function 'int
Object::arrayGetLength()':
/usr/include/poppler/Object.h:244: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::arrayAdd(Object*)':
/usr/include/poppler/Object.h:247: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::arrayGet(int, Object*)':
/usr/include/poppler/Object.h:250: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::arrayGetNF(int, Object*)':
/usr/include/poppler/Object.h:253: warning: deprecated conversion from
string constant to 'char*'
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from quantizer.hh:13,
                 from quantizer.cc:8:
/usr/include/poppler/Object.h: In member function 'int
Object::dictGetLength()':
/usr/include/poppler/Object.h:262: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::dictAdd(char*, Object*)':
/usr/include/poppler/Object.h:265: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::dictSet(char*, Object*)':
/usr/include/poppler/Object.h:268: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'GBool
Object::dictIs(char*)':
/usr/include/poppler/Object.h:271: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictLookup(char*, Object*)':
/usr/include/poppler/Object.h:277: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictLookupNF(char*, Object*)':
/usr/include/poppler/Object.h:280: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'char*
Object::dictGetKey(int)':
/usr/include/poppler/Object.h:283: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictGetVal(int, Object*)':
/usr/include/poppler/Object.h:286: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictGetValNF(int, Object*)':
/usr/include/poppler/Object.h:289: warning: deprecated conversion from
string constant to 'char*'
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from quantizer.hh:13,
                 from quantizer.cc:8:
/usr/include/poppler/Object.h: In member function 'GBool
Object::streamIs(char*)':
/usr/include/poppler/Object.h:298: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void Object::streamReset()':
/usr/include/poppler/Object.h:304: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void Object::streamClose()':
/usr/include/poppler/Object.h:307: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'int
Object::streamGetChar()':
/usr/include/poppler/Object.h:310: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'int
Object::streamLookChar()':
/usr/include/poppler/Object.h:313: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'char*
Object::streamGetLine(char*, int)':
/usr/include/poppler/Object.h:316: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Guint
Object::streamGetPos()':
/usr/include/poppler/Object.h:319: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::streamSetPos(Guint, int)':
/usr/include/poppler/Object.h:322: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Dict*
Object::streamGetDict()':
/usr/include/poppler/Object.h:325: warning: deprecated conversion from
string constant to 'char*'
g++ -Wall -O3 -pthread -I/usr/include/poppler   -DPOPPLER_VERSION=807 
-DDJVULIBRE_BIN_PATH="\"/usr/bin\""   -c -o pdf2djvu.o pdf2djvu.cc
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from pdf2djvu.cc:21:
/usr/include/poppler/Object.h: In member function 'int
Object::arrayGetLength()':
/usr/include/poppler/Object.h:244: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::arrayAdd(Object*)':
/usr/include/poppler/Object.h:247: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::arrayGet(int, Object*)':
/usr/include/poppler/Object.h:250: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::arrayGetNF(int, Object*)':
/usr/include/poppler/Object.h:253: warning: deprecated conversion from
string constant to 'char*'
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from pdf2djvu.cc:21:
/usr/include/poppler/Object.h: In member function 'int
Object::dictGetLength()':
/usr/include/poppler/Object.h:262: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::dictAdd(char*, Object*)':
/usr/include/poppler/Object.h:265: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::dictSet(char*, Object*)':
/usr/include/poppler/Object.h:268: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'GBool
Object::dictIs(char*)':
/usr/include/poppler/Object.h:271: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictLookup(char*, Object*)':
/usr/include/poppler/Object.h:277: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictLookupNF(char*, Object*)':
/usr/include/poppler/Object.h:280: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'char*
Object::dictGetKey(int)':
/usr/include/poppler/Object.h:283: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictGetVal(int, Object*)':
/usr/include/poppler/Object.h:286: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Object*
Object::dictGetValNF(int, Object*)':
/usr/include/poppler/Object.h:289: warning: deprecated conversion from
string constant to 'char*'
In file included from /usr/include/poppler/XRef.h:17,
                 from /usr/include/poppler/PDFDoc.h:17,
                 from compoppler.hh:17,
                 from pdf2djvu.cc:21:
/usr/include/poppler/Object.h: In member function 'GBool
Object::streamIs(char*)':
/usr/include/poppler/Object.h:298: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void Object::streamReset()':
/usr/include/poppler/Object.h:304: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void Object::streamClose()':
/usr/include/poppler/Object.h:307: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'int
Object::streamGetChar()':
/usr/include/poppler/Object.h:310: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'int
Object::streamLookChar()':
/usr/include/poppler/Object.h:313: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'char*
Object::streamGetLine(char*, int)':
/usr/include/poppler/Object.h:316: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Guint
Object::streamGetPos()':
/usr/include/poppler/Object.h:319: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'void
Object::streamSetPos(Guint, int)':
/usr/include/poppler/Object.h:322: warning: deprecated conversion from
string constant to 'char*'
/usr/include/poppler/Object.h: In member function 'Dict*
Object::streamGetDict()':
/usr/include/poppler/Object.h:325: warning: deprecated conversion from
string constant to 'char*'
g++ -Wall -O3 -pthread -I/usr/include/poppler   -DPOPPLER_VERSION=807 
-DDJVULIBRE_BIN_PATH="\"/usr/bin\""    pdf2djvu.o compoppler.o debug.o
config.o system.o sexpr.o quantizer.o -lpoppler -ldjvulibre -ljpeg
-lpthread -lm      -o pdf2djvu 
+ exit 0
Executing(%install): /bin/sh -e /home/rpmbuild/rpm/tmp/rpm-tmp.juOdvP
+ umask 022
+ cd /home/rpmbuild/rpm/BUILD
+ cd pdf2djvu-0.4.13
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /home/rpmbuild/rpm/BUILDROOT/pdf2djvu-0.4.13-1.fc10.i386
+ install -D doc/pdf2djvu.1
/home/rpmbuild/rpm/BUILDROOT/pdf2djvu-0.4.13-1.fc10.i386/usr/share/man/man1/pdf2
djvu.1
+ install -D pdf2djvu
/home/rpmbuild/rpm/BUILDROOT/pdf2djvu-0.4.13-1.fc10.i386/usr/bin/pdf2djvu
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id
/home/rpmbuild/rpm/BUILD/pdf2djvu-0.4.13
extracting debug info from
/home/rpmbuild/rpm/BUILDROOT/pdf2djvu-0.4.13-1.fc10.i386/usr/bin/pdf2djvu
+ /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: pdf2djvu-0.4.13-1.fc10
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2) libdjvulibre.so.15
libgcc_s.so.1 libgcc_s.so.1(GCC_3.0) libjpeg.so.62 libm.so.6
libpoppler.so.3 libpthread.so.0 libpthread.so.0(GLIBC_2.0) libstdc++.so.6
libstdc++.so.6(CXXABI_1.3) libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4.9) rtld(GNU_HASH)
Processing files: pdf2djvu-debuginfo-0.4.13-1.fc10
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/home/rpmbuild/rpm/BUILDROOT/pdf2djvu-0.4.13-1.fc10.i386
Wrote: /home/rpmbuild/rpm/SRPMS/pdf2djvu-0.4.13-1.fc10.src.rpm
Wrote: /home/rpmbuild/rpm/RPMS/i386/pdf2djvu-0.4.13-1.fc10.i386.rpm
Wrote: /home/rpmbuild/rpm/RPMS/i386/pdf2djvu-debuginfo-0.4.13-1.fc10.i386.rpm
Executing(%clean): /bin/sh -e /home/rpmbuild/rpm/tmp/rpm-tmp.EJtiwy
+ umask 022
+ cd /home/rpmbuild/rpm/BUILD
+ cd pdf2djvu-0.4.13
+ rm -rf /home/rpmbuild/rpm/BUILDROOT/pdf2djvu-0.4.13-1.fc10.i386
+ exit 0

Original issue reported on code.google.com by rakesh.p...@gmail.com on 4 Nov 2008 at 6:22

GoogleCodeExporter commented 9 years ago
These warnings originate from poppler, so I cannot actually fix them. You could
suppress them with -Wno-write-strings. I am not going to do it myself, as I 
would
really dislike having such warning suppressed in *my own* code.

Original comment by pro...@gmail.com on 4 Nov 2008 at 9:19

GoogleCodeExporter commented 9 years ago
Thanks for clarification, aah my bad I did not look into details.

Original comment by rakesh.p...@gmail.com on 4 Nov 2008 at 9:25