|
From: Mojca M. <moj...@gm...> - 2011-01-19 02:49:07
|
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
|
|
From: Ethan M. <merritt@u.washington.edu> - 2011-01-19 03:09:04
|
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 > |
|
From: Allin C. <cot...@wf...> - 2011-01-19 04:49:28
|
On Tue, 18 Jan 2011, Ethan Merritt wrote: > 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 ... > > > 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. I think it's due to the business of redefining sprintf in gnuplot's util.c: #ifdef HAVE_SNPRINTF # define sprintf(str,fmt,arg) ... <to use snprintf> This is prefixed with a comment of "Kludge alert!!" and it does look funky, but I guess it's harmless. Allin Cottrell |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2011-01-19 18:34:43
|
On 19.01.2011 04:08, Ethan Merritt wrote:
> On Tuesday, January 18, 2011, Mojca Miklavec wrote:
>> ../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);
>> 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.
|
|
From: Mojca M. <moj...@gm...> - 2011-01-19 03:23:46
|
On Wed, Jan 19, 2011 at 04:08, Ethan Merritt wrote: > 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? > gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664) >> 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! If I only knew what to report ... (I can send the file.) >> /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? No. It is printed out during compilation of gnuplot (configured with --without-bitmap-terminals --with-cwdrc --without-tutorial --disable-wxwidgets --without-latex). But I need to double-check. Mojca PS: I tried to compile gnuplot with external (self-compiled) readline and it kept crashing, but I had other problems as well, so maybe there were other reasons. |
|
From: Ethan M. <merritt@u.washington.edu> - 2011-01-19 03:44:08
|
On Tuesday, January 18, 2011, Mojca Miklavec wrote: > PS: I tried to compile gnuplot with external (self-compiled) readline > and it kept crashing, but I had other problems as well, so maybe there > were other reasons. The "native" OSX readline (which is really libedit in disguise) is now working fine as tested here on 10.4 and 10.5. I don't have a 10.6 machine to test on, however. Ethan |
|
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 |
|
From: Allin C. <cot...@wf...> - 2011-01-20 23:13:18
|
On Thu, 20 Jan 2011, Werner Smekal wrote: > >>> ../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). No it wouldn't. Perhaps you're thinking of puts(), which does add '\n'. Allin Cottrell |