From 6da0c767cd83c18aa8a2c152ad6b0298ea4f28ab Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 2 Dec 2016 21:08:15 +0000 Subject: Avoid "warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'long unsigned int'" on platforms where TCL_WIDE_INT_IS_LONG. Warning introduced by check-in [e3ba334a42] which was merged to trunk by [eac13870dc]. This fix also was made by [418b169207] which has not yet been merged to trunk. --- generic/tclStringObj.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 4b171f3..9471381 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2712,7 +2712,8 @@ TclStringRepeat( if (0 == Tcl_AttemptSetObjLength(objResultPtr, count*length)) { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "string size overflow: unable to alloc %llu bytes", + "string size overflow: unable to alloc %" + TCL_LL_MODIFIER "u bytes", (Tcl_WideUInt)STRING_SIZE(count*length))); Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); } @@ -2935,7 +2936,8 @@ TclStringCatObjv( if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "concatenation failed: unable to alloc %llu bytes", + "concatenation failed: unable to alloc %" + TCL_LL_MODIFIER "u bytes", (Tcl_WideUInt)STRING_SIZE(length))); Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); } @@ -2950,7 +2952,8 @@ TclStringCatObjv( if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "concatenation failed: unable to alloc %llu bytes", + "concatenation failed: unable to alloc %" + TCL_LL_MODIFIER "u bytes", (Tcl_WideUInt)STRING_SIZE(length))); Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); } -- cgit v0.12