Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 49499
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: martin [...] gkc.org.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 804.028
Fixed in: 804.028_502



Subject: Format string errors in Tk.xs and tkGlue.xs
Compiling Tk with gcc version 4.3.2 produced two error messages about "format not a string literal and no format arguments" One is line 576 of Tk.xs, which I changed from: croak(Tcl_GetStringResult(interp)); to: croak("%s",Tcl_GetStringResult(interp)); The other is line 2630 of tkGlue.c which I changed from: croak(Tcl_GetString(Tcl_GetObjResult(info->interp))); to: croak("%s", Tcl_GetString(Tcl_GetObjResult(info->interp))); Patchfile: *** Tk.xs~ Thu Nov 15 20:14:02 2007 --- Tk.xs Mon Sep 7 22:57:41 2009 *************** *** 573,579 **** { Tcl_ResetResult(interp); if (Tk_DefineBitmap(interp, Tk_GetUid(name), data, width, height) != TCL_OK) ! croak(Tcl_GetStringResult(interp)); } else { --- 573,579 ---- { Tcl_ResetResult(interp); if (Tk_DefineBitmap(interp, Tk_GetUid(name), data, width, height) != TCL_OK) ! croak("%s",Tcl_GetStringResult(interp)); } else { *** tkGlue.c~ Thu Nov 15 19:50:29 2007 --- tkGlue.c Mon Sep 7 22:58:47 2009 *************** *** 2627,2633 **** if (retval != TCL_OK) { Tcl_DecrRefCount(result); ! croak(Tcl_GetString(Tcl_GetObjResult(info->interp))); } retval = Return_Object(items,offset,result); Tcl_DecrRefCount(result); --- 2627,2633 ---- if (retval != TCL_OK) { Tcl_DecrRefCount(result); ! croak("%s", Tcl_GetString(Tcl_GetObjResult(info->interp))); } retval = Return_Object(items,offset,result); Tcl_DecrRefCount(result);
On Mon Sep 07 18:05:54 2009, MWARD wrote: Show quoted text
> Compiling Tk with gcc version 4.3.2 produced two error messages > about "format not a string literal and no format arguments" > > One is line 576 of Tk.xs, which I changed from: > > croak(Tcl_GetStringResult(interp)); > > to: > > croak("%s",Tcl_GetStringResult(interp)); > > The other is line 2630 of tkGlue.c which I changed from: > > croak(Tcl_GetString(Tcl_GetObjResult(info->interp))); > > to: > > croak("%s", Tcl_GetString(Tcl_GetObjResult(info->interp))); > > > Patchfile: > > *** Tk.xs~ Thu Nov 15 20:14:02 2007 > --- Tk.xs Mon Sep 7 22:57:41 2009 > *************** > *** 573,579 **** > { > Tcl_ResetResult(interp); > if (Tk_DefineBitmap(interp, Tk_GetUid(name), data, width, height) > != TCL_OK) > ! croak(Tcl_GetStringResult(interp)); > } > else > { > --- 573,579 ---- > { > Tcl_ResetResult(interp); > if (Tk_DefineBitmap(interp, Tk_GetUid(name), data, width, height) > != TCL_OK) > ! croak("%s",Tcl_GetStringResult(interp)); > } > else > { > > > *** tkGlue.c~ Thu Nov 15 19:50:29 2007 > --- tkGlue.c Mon Sep 7 22:58:47 2009 > *************** > *** 2627,2633 **** > if (retval != TCL_OK) > { > Tcl_DecrRefCount(result); > ! croak(Tcl_GetString(Tcl_GetObjResult(info->interp))); > } > retval = Return_Object(items,offset,result); > Tcl_DecrRefCount(result); > --- 2627,2633 ---- > if (retval != TCL_OK) > { > Tcl_DecrRefCount(result); > ! croak("%s", Tcl_GetString(Tcl_GetObjResult(info->interp))); > } > retval = Return_Object(items,offset,result); > Tcl_DecrRefCount(result);
Thanks. This is patched in https://svn.perl.org/modules/Tk/trunk@13394 Regards, Slaven