Skip Menu |

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 77802
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: duvny [...] yopmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Compilation warnings
$ cc --version Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.4.0 Thread model: posix cc -c -I/opt/local/include/libxml2 -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"1.99\" -DXS_VERSION=\"1.99\" "-I/usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin-2level/CORE" -DHAVE_UTF8 -DHAVE_BLANK LibXML.c LibXML.xs:640:5: warning: expression result unused [-Wunused-value] SvREFCNT_inc(results); ^~~~~~~~~~~~~~~~~~~~~ /usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin-2level/CORE/sv.h:233:2: note: expanded from macro 'SvREFCNT_inc' _sv; \ ^~~ LibXML.xs:8075:9: warning: expression result unused [-Wunused-value] SvREFCNT_inc(fh); /* _dec'd by LibXML_close_perl */ ^~~~~~~~~~~~~~~~ /usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin-2level/CORE/sv.h:233:2: note: expanded from macro 'SvREFCNT_inc' _sv; \ ^~~ LibXML.xs:1454:5: warning: implicit declaration of function 'boot_XML__LibXML__Devel' is invalid in C99 [-Wimplicit-function-declaration] boot_XML__LibXML__Devel(aTHX_ cv); ^ 3 warnings generated. cc -c -I/opt/local/include/libxml2 -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"1.99\" -DXS_VERSION=\"1.99\" "-I/usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin-2level/CORE" -DHAVE_UTF8 -DHAVE_BLANK perl-libxml-mm.c perl-libxml-mm.c:931:12: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (len<0) len=xmlStrlen(string); ~~~^~ 1 warning generated. cc -c -I/opt/local/include/libxml2 -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"1.99\" -DXS_VERSION=\"1.99\" "-I/usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin-2level/CORE" -DHAVE_UTF8 -DHAVE_BLANK perl-libxml-sax.c perl-libxml-sax.c:180:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (p1 = buffer->head) { ~~~^~~~~~~~~~~~~~ perl-libxml-sax.c:180:9: note: place parentheses around the assignment to silence this warning if (p1 = buffer->head) { ^ ( ) perl-libxml-sax.c:180:9: note: use '==' to turn this assignment into an equality comparison if (p1 = buffer->head) { ^ == perl-libxml-sax.c:207:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (p1 = buffer->head) { ~~~^~~~~~~~~~~~~~ perl-libxml-sax.c:207:9: note: place parentheses around the assignment to silence this warning if (p1 = buffer->head) { ^ ( ) perl-libxml-sax.c:207:9: note: use '==' to turn this assignment into an equality comparison if (p1 = buffer->head) { ^ == 2 warnings generated.
Hi, thanks for the report. This was fixed in commit 0c80fb524f6c68c58ecc339ee4c77d4710346034 in the repository, which will be part of XML-LibXML-2.0000 which I hope to release soon. We may likely need to fix many other warnings if we turn on more warning flags whether in gcc or in clang. Regards, -- Shlomi Fish On Wed Jun 13 13:22:20 2012, duvny wrote: Show quoted text
> $ cc --version > Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM > 3.1svn) > Target: x86_64-apple-darwin11.4.0 > Thread model: posix > > cc -c -I/opt/local/include/libxml2 -fno-common -DPERL_DARWIN > -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include > -I/opt/local/include -O3 -DVERSION=\"1.99\" -DXS_VERSION=\"1.99\" > "-I/usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin-2level/CORE" > -DHAVE_UTF8 -DHAVE_BLANK LibXML.c > LibXML.xs:640:5: warning: expression result unused [-Wunused-value] > SvREFCNT_inc(results); > ^~~~~~~~~~~~~~~~~~~~~ > /usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin- > 2level/CORE/sv.h:233:2: > note: > expanded from macro 'SvREFCNT_inc' > _sv; \ > ^~~ > LibXML.xs:8075:9: warning: expression result unused [-Wunused-value] > SvREFCNT_inc(fh); /* _dec'd by LibXML_close_perl */ > ^~~~~~~~~~~~~~~~ > /usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin- > 2level/CORE/sv.h:233:2: > note: > expanded from macro 'SvREFCNT_inc' > _sv; \ > ^~~ > LibXML.xs:1454:5: warning: implicit declaration of function > 'boot_XML__LibXML__Devel' is invalid in C99 > [-Wimplicit-function-declaration] > boot_XML__LibXML__Devel(aTHX_ cv); > ^ > 3 warnings generated. > > cc -c -I/opt/local/include/libxml2 -fno-common -DPERL_DARWIN > -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include > -I/opt/local/include -O3 -DVERSION=\"1.99\" -DXS_VERSION=\"1.99\" > "-I/usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin-2level/CORE" > -DHAVE_UTF8 -DHAVE_BLANK perl-libxml-mm.c > perl-libxml-mm.c:931:12: warning: comparison of unsigned expression < > 0 is > always false [-Wtautological-compare] > if (len<0) len=xmlStrlen(string); > ~~~^~ > 1 warning generated. > > cc -c -I/opt/local/include/libxml2 -fno-common -DPERL_DARWIN > -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include > -I/opt/local/include -O3 -DVERSION=\"1.99\" -DXS_VERSION=\"1.99\" > "-I/usr/local/perlbrew/perls/perl-5.16/lib/5.16.0/darwin-2level/CORE" > -DHAVE_UTF8 -DHAVE_BLANK perl-libxml-sax.c > perl-libxml-sax.c:180:9: warning: using the result of an assignment as > a > condition without parentheses [-Wparentheses] > if (p1 = buffer->head) { > ~~~^~~~~~~~~~~~~~ > perl-libxml-sax.c:180:9: note: place parentheses around the assignment > to > silence this warning > if (p1 = buffer->head) { > ^ > ( ) > perl-libxml-sax.c:180:9: note: use '==' to turn this assignment into > an > equality > comparison > if (p1 = buffer->head) { > ^ > == > perl-libxml-sax.c:207:9: warning: using the result of an assignment as > a > condition without parentheses [-Wparentheses] > if (p1 = buffer->head) { > ~~~^~~~~~~~~~~~~~ > perl-libxml-sax.c:207:9: note: place parentheses around the assignment > to > silence this warning > if (p1 = buffer->head) { > ^ > ( ) > perl-libxml-sax.c:207:9: note: use '==' to turn this assignment into > an > equality > comparison > if (p1 = buffer->head) { > ^ > == > 2 warnings generated.