|
From: Werner S. <wer...@mi...> - 2011-01-20 16:29:37
|
> > > >>> ../term/post.trm:1819: warning: format not a string literal and no >>> format arguments >>> >>> This comes from >>> static char GPFAR psg1[] = "0 setgray\nnewpath\n"; >>> fprintf(gppsfile, psg1); >> [\me scratches head] Sure looks like a string literal to me. > > It's not. It's s string-valued variable. > > The complaint is a bit vague, but what I'm pretty sure the compiler is > trying to tell us here is that it's kinda pointless to use *printf() if > you're not going to format any data into the output. It wants us to > replace the above fprintf() by either > > fprintf(gppsfile, "%s", psg1); > > or > > fputs(psg1, gppsfile); It's a security problem, e.g. http://bobthegnome.blogspot.com/2009/07/format-not-string-literal-and-no-format.html, which might be exploited. Hans' first version would be IMO the correct one (the second one would add an extra \n). Regards, Werner >>> In gnuplot-mode: >>> gnuplot.el:2518:41:Warning: `make-variable-buffer-local' should be called at >>> toplevel >> I have no idea what this means, or even who is printing the error. > >> Is that a message from emacs? > > Yes. > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > ------------------------------------------------------------------------ > > Ethan Merritt <mailto:merritt@u.washington.edu> > January 19, 2011 4:08 AM > > > On Tuesday, January 18, 2011, Mojca Miklavec wrote: >> I'm sending a copy of some errors that get reported when I try to >> compile gnuplot ... > > Errors from what version of which compiler? > >> In file included from term.h:349, >> from term.c:1399: >> ../term/post.trm: In function 'PS_graphics': >> ../term/post.trm:1819: warning: format not a string literal and no >> format arguments >> >> This comes from >> static char GPFAR psg1[] = "0 setgray\nnewpath\n"; >> fprintf(gppsfile, psg1); > > [\me scratches head] Sure looks like a string literal to me. > > >> util.c:524:1: warning: "sprintf" redefined >> In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdio.h:443, >> from stdfn.h:48, >> from util.h:41, >> from util.c:37: > > That seems to be an error in stdio.h as provided by SDK. > Report it to Apple! > > >> /Developer/SDKs/MacOSX10.6.sdk/usr/include/secure/_stdio.h:46:1: >> warning: this is the location of the previous definition >> wxterminal/gp_cairo.c: In function 'gp_cairo_convert': >> wxterminal/gp_cairo.c:678: warning: format '%d' expects type 'int', >> but argument 5 has type 'gsize' >> wxterminal/gp_cairo.c:678: warning: format '%d' expects type 'int', >> but argument 6 has type 'size_t' >> gplt_x11.c: In function 'exec_cmd': >> gplt_x11.c:2892: warning: format not a string literal and no format arguments >> gplt_x11.c:2897: warning: format not a string literal and no format arguments >> gplt_x11.c:2902: warning: format not a string literal and no format arguments >> gplt_x11.c:2907: warning: format not a string literal and no format arguments > > Those messages are garbage. Ignore them. > >> In gnuplot-comint-start-function: >> gnuplot.el:1838:18:Warning: `make-variable-buffer-local' should be called at >> toplevel >> >> In gnuplot-mode: >> gnuplot.el:2518:41:Warning: `make-variable-buffer-local' should be called at >> toplevel > > I have no idea what this means, or even who is printing the error. > Is that a message from emacs? > > >> Some more are related to AquaTerm, but that's an issue on its own. >> >> Mojca >> >> ------------------------------------------------------------------------------ >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> gnuplot-beta mailing list >> gnu...@li... >> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta >> > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > ------------------------------------------------------------------------ > > Mojca Miklavec <mailto:moj...@gm...> > January 19, 2011 3:49 AM > > > I'm sending a copy of some errors that get reported when I try to > compile gnuplot ... > > In file included from term.h:349, > from term.c:1399: > ../term/post.trm: In function 'PS_graphics': > ../term/post.trm:1819: warning: format not a string literal and no > format arguments > > This comes from > static char GPFAR psg1[] = "0 setgray\nnewpath\n"; > fprintf(gppsfile, psg1); > > util.c:524:1: warning: "sprintf" redefined > In file included from > /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdio.h:443, > from stdfn.h:48, > from util.h:41, > from util.c:37: > /Developer/SDKs/MacOSX10.6.sdk/usr/include/secure/_stdio.h:46:1: > warning: this is the location of the previous definition > wxterminal/gp_cairo.c: In function 'gp_cairo_convert': > wxterminal/gp_cairo.c:678: warning: format '%d' expects type 'int', > but argument 5 has type 'gsize' > wxterminal/gp_cairo.c:678: warning: format '%d' expects type 'int', > but argument 6 has type 'size_t' > gplt_x11.c: In function 'exec_cmd': > gplt_x11.c:2892: warning: format not a string literal and no format > arguments > gplt_x11.c:2897: warning: format not a string literal and no format > arguments > gplt_x11.c:2902: warning: format not a string literal and no format > arguments > gplt_x11.c:2907: warning: format not a string literal and no format > arguments > > In gnuplot-comint-start-function: > gnuplot.el:1838:18:Warning: `make-variable-buffer-local' should be > called at > toplevel > > In gnuplot-mode: > gnuplot.el:2518:41:Warning: `make-variable-buffer-local' should be > called at > toplevel > > Some more are related to AquaTerm, but that's an issue on its own. > > Mojca > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > ------------------------------------------------------------------------ -- Werner Smekal email: wer...@mi... phone: +43-(0)680-1419590 |