[Bug 227481] New: mysql-5.0.26-12: comparison with string literal
https://bugzilla.novell.com/show_bug.cgi?id=227481 Summary: mysql-5.0.26-12: comparison with string literal Product: openSUSE 10.3 Version: unspecified Platform: All OS/Version: SuSE Linux 10.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de I just tried to compile package mysql-5.0.26-12 The compiler said default.c:1051: warning: comparison with string literal The source code is if (DEFAULT_SYSCONFDIR != "") Suggest new code if (strcmp( DEFAULT_SYSCONFDIR, "") != 0) -- 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, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=227481 mhorvath@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |mmarek@novell.com |screening@forge.provo.novell| |.com | OS/Version|SuSE Linux 10.1 |SuSE Other -- 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, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=227481 mmarek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- 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, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=227481 mmarek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WONTFIX ------- Comment #1 from mmarek@novell.com 2006-12-19 03:54 MST ------- We build mysql with -DDEFAULT_SYSCONFDIR="/etc", so this warning is harmless. Good candidate for an upstream bugreport: http://bugs.mysql.com/ . -- 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, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=227481 dcb314@hotmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | ------- Comment #2 from dcb314@hotmail.com 2006-12-19 05:14 MST -------
We build mysql with -DDEFAULT_SYSCONFDIR="/etc", so this warning is harmless.
My understanding is that the value of DEFAULT_SYSCONFDIR is irrelevant. The compiler is complaining that it makes no sense to compare anything with the address of a string literal because the address is some random address known to the compiler. This is C code, not C++ - in C++ this might have worked. -- 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, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=227481 mmarek@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |WONTFIX ------- Comment #3 from mmarek@novell.com 2006-12-19 05:24 MST ------- DEFAULT_SYSCONFDIR is a macro which expands to "/etc". So the expression will be ("/etc" != ""), which will evaluate to 1 as the programer expected (different string constants will be stored at different address, both in C and C++). So this bug really doesn't affect the binaries in our packages (otherwise we would have more serious problems like mysql not loading /etc/my.cnf or so). -- 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, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=227481 ------- Comment #4 from mmarek@novell.com 2006-12-21 05:23 MST ------- FYI: I filed bug 230189 to disable warnings like this. -- 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, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com