View Bug Activity | Format For Printing
When compiling the latest systemtap tarball, v 0;9 with 0.140 elfutils package, gives the following compile time warning: tapsets.cxx: In member function ‘std::string dwflpp::express_as_string(std::string, std::string, location*)’: tapsets.cxx:2299: error: format not a string literal and no format arguments tapsets.cxx:2301: error: format not a string literal and no format arguments Since the Makefile passes the -Werror flag, warnings are treated as errors and the compilation aborts. This was seen on a x86_64 system on Ubuntu Intrepid (8.10), running 2.6.29-rc4 kernel, with gcc version 4.3.2.
The following patch fixes the problem for Ankita. Do we want this fix or is removing -Werror preferred? --- tapsets.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: systemtap-20feb/tapsets.cxx =================================================================== --- systemtap-20feb.orig/tapsets.cxx +++ systemtap-20feb/tapsets.cxx @@ -2296,9 +2296,9 @@ struct dwflpp assert(memstream); fprintf(memstream, "{\n"); - fprintf(memstream, prelude.c_str()); + fprintf(memstream, "%s", prelude.c_str()); bool deref = c_emit_location (memstream, head, 1); - fprintf(memstream, postlude.c_str()); + fprintf(memstream, "%s", postlude.c_str()); fprintf(memstream, " goto out;\n"); // dummy use of deref_fault label, to disable warning if deref() not used
(In reply to comment #1) > The following patch fixes the problem for Ankita. Do we want this fix or is > removing -Werror preferred? IMHO we want this fix and keep -Werror, it catches important stuff.
*** Bug 9898 has been marked as a duplicate of this bug. ***
Commit bec508de upstream.
*** Bug 9900 has been marked as a duplicate of this bug. ***
*** Bug 9899 has been marked as a duplicate of this bug. ***