Hello,

plotutils 2.6 FTBFS with -Werror=format-security:

g++ -DHAVE_CONFIG_H -I. -I.. -I./../include -I./include  -Wdate-time 
-D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat 
-Werror=format-security -c -o gram.o gram.cc
gram.yy: In function 'char* do_sprintf(const char*, const double*, int)':
gram.yy:1836:50: error: format not a string literal and no format arguments 
[-Werror=format-security]
        sprintf(sprintf_buf, one_format.contents());
                                                  ^
gram.yy: In function 'int yyparse()':
gram.yy:347:29: warning: ignoring return value of 'int system(const char*)', 
declared with attribute warn_unused_result [-Wunused-result]
cc1plus: some warnings being treated as errors
Makefile:525: recipe for target 'gram.o' failed
make[4]: *** [gram.o] Error 1

This was reported in Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=1037251
fixed there by the attached patch with changelog message
* Wed Dec 04 2013 Stanislav Ochotnicky <[email protected]> - 2.6-10
- Fix FTBFS when "-Werror=format-security" is used


cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
diff --git a/pic2plot/gram.yy b/pic2plot/gram.yy
index d11320b..1bcce46 100644
--- a/pic2plot/gram.yy
+++ b/pic2plot/gram.yy
@@ -1833,7 +1833,7 @@ do_sprintf(const char *form, const double *v, int nv)
 	    {
 	      one_format += *form++;
 	      one_format += '\0';
-	      sprintf(sprintf_buf, one_format.contents());
+	      sprintf(sprintf_buf, "%s", one_format.contents());
 	    }
 	  else 
 	    {
_______________________________________________
Bug-plotutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-plotutils

Reply via email to