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);