[Bug 700784] New: Strange gcc warning
https://bugzilla.novell.com/show_bug.cgi?id=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c0 Summary: Strange gcc warning Classification: openSUSE Product: openSUSE 12.1 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Development AssignedTo: rguenther@novell.com ReportedBy: aj@novell.com QAContact: qa@suse.de Found By: Product Management Blocker: --- The following code when compiled with g++: execlp( "rm", "rm", "-rf", conf->GetProfileDir().c_str(), NULL ); gives this warning: scpm_helpers.cc:1491:66: warning: missing sentinel in function call [-Wformat] this happens only on i586. for details check package scpm in project Base:System A trivial C++ program with just this line did not reproduce the bug. -- 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=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c1 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |aj@novell.com --- Comment #1 from Richard Guenther <rguenther@novell.com> 2011-06-20 09:22:34 UTC --- Testcase? -- 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=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c2 --- Comment #2 from Andreas Jaeger <aj@novell.com> 2011-06-20 09:34:27 UTC --- g++ -g -Wall -fPIC -I. -I../modules -I../../include -I../scdb -DSCPM_VERSION=\"1.1.7\" -c -o scpm_helpers.o scpm_helpers.cc -save-temps In file included from ./log.hh:25:0, from ../scdb/scdb.hh:25, from scpm_helpers.hh:25, from scpm_helpers.cc:18: ./../include/scpm_types.h:36:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./../include/scpm_types.h:44:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./../include/scpm_types.h:51:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./../include/scpm_types.h:61:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./../include/scpm_types.h:67:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./../include/scpm_types.h:82:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./../include/scpm_types.h:89:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./../include/scpm_types.h:96:1: warning: ‘typedef’ was ignored in this declaration [enabled by default] In file included from ../scdb/scdb.hh:26:0, from scpm_helpers.hh:25, from scpm_helpers.cc:18: ./scdb/xml.hh:61:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./scdb/xml.hh:63:27: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./scdb/xml.hh:92:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./scdb/xml.hh:94:32: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./scdb/xml.hh:101:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] In file included from scpm_helpers.hh:25:0, from scpm_helpers.cc:18: ./scdb/scdb.hh:45:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./scdb/scdb.hh:50:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] ./scdb/scdb.hh:57:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] In file included from scpm_helpers.hh:28:0, from scpm_helpers.cc:18: journal.hh:36:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] journal.hh:42:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] journal.hh:93:33: warning: ‘typedef’ was ignored in this declaration [enabled by default] journal.hh:99:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] In file included from scpm_helpers.cc:19:0: scpm_conf.hh:77:26: warning: ‘typedef’ was ignored in this declaration [enabled by default] scpm_conf.hh:78:32: warning: ‘typedef’ was ignored in this declaration [enabled by default] In file included from scpm_helpers.cc:22:0: ./scdb/scdb_util.hh:34:2: warning: ‘typedef’ was ignored in this declaration [enabled by default] scpm_helpers.cc: In member function ‘void SCPM_helpers::PerformCommand(Journal::entry&)’: scpm_helpers.cc:1491:66: warning: missing sentinel in function call [-Wformat] -- 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=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c3 --- Comment #3 from Andreas Jaeger <aj@novell.com> 2011-06-20 09:36:11 UTC --- Created an attachment (id=435376) --> (http://bugzilla.novell.com/attachment.cgi?id=435376) preprocessed file The execlp line gets preprocessed to due to stddef.h: execlp( "rm", "rm", "-rf", conf->GetProfileDir().c_str(), 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.
https://bugzilla.novell.com/show_bug.cgi?id=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c4 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|aj@novell.com | --- Comment #4 from Andreas Jaeger <aj@novell.com> 2011-06-20 09:36:41 UTC --- Info provided. -- 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=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c5 --- Comment #5 from Richard Guenther <rguenther@novell.com> 2011-06-20 09:56:55 UTC --- That's not our stddef.h, preprocessing to 0 is broken as 0 is an int and gets passed differently to varargs functions than (void *)0. Our stddef.h does #undef NULL /* in case <stdio.h> has defined it. */ #ifdef __GNUG__ #define NULL __null #else /* G++ */ #ifndef __cplusplus #define NULL ((void *)0) #else /* C++ */ #define NULL 0 #endif /* C++ */ #endif /* G++ */ thus, defines it to __null. Can you provide -dD -E output? I do see severall occurances of __null in the preprocessed source, so I suspect the code defines __null to 0 somewhere. -- 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=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c6 Richard Guenther <rguenther@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |aj@novell.com --- Comment #6 from Richard Guenther <rguenther@novell.com> 2011-06-20 09:57:24 UTC --- . -- 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=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c7 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|aj@novell.com | AssignedTo|rguenther@novell.com |aj@novell.com --- Comment #7 from Andreas Jaeger <aj@novell.com> 2011-06-20 11:02:42 UTC --- You're right it comes from: 1 "/usr/include/linux/stddef.h" 1 3 4 #define _LINUX_STDDEF_H #undef NULL #define NULL 0 /usr/include/bits/sigcontext.h is doing this - so a glibc bug. I'm taking the bug... -- 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=700784 https://bugzilla.novell.com/show_bug.cgi?id=700784#c8 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #8 from Andreas Jaeger <aj@novell.com> 2011-06-20 11:51:39 UTC --- Fixed now. -- 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.
participants (1)
-
bugzilla_noreply@novell.com