[Bug 432592] New: libtwin0-0.0.3-23: ordered comparison of pointer with integer zero
https://bugzilla.novell.com/show_bug.cgi?id=432592 Summary: libtwin0-0.0.3-23: ordered comparison of pointer with integer zero Product: openSUSE 11.1 Version: Factory Platform: All OS/Version: openSUSE 11.0 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de Found By: --- I just tried to compile Suse Linux package libtwin0-0.0.3-23 and the compiler said libtwin/twin_cursor.c:184: warning: ordered comparison of pointer with integer zero The source code is fd = cursor_open(file); if (fd < 0) return NULL; Suggest replace with fd = cursor_open(file); if (fd == 0) return NULL; -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432592
Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=432592
Stefan Assmann
https://bugzilla.novell.com/show_bug.cgi?id=432592
User sassmann@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=432592#c1
Stefan Assmann
Suggest replace with
fd = cursor_open(file); if (fd == 0) return NULL;
This is not entirely correct. cursor_open can be expanded to either open() or gzopen() depending on the presence of zlib. open() returns -1 on failure while gzopen returns Z_NULL. I don't see this warning, could you provide the whole gcc call with compiler flags? I guess you compiled with "-pedantic". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432592
User dcb314@hotmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=432592#c2
David Binderman
I don't see this warning, could you provide the whole gcc call with compiler flags?
Tricky - I've got my own home brew version of the GNU gcc compiler which does some special magic.
I guess you compiled with "-pedantic".
Nope, but switching on "-Wall -Wextra -O3" will probably get what you need. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=432592
User stefan.fent@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=432592#c5
--- Comment #5 from Stefan Fent
https://bugzilla.novell.com/show_bug.cgi?id=432592
User stefan.fent@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=432592#c6
Stefan Fent
participants (1)
-
bugzilla_noreply@novell.com