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.

From: andy <[email-masked]>
Date: Fri, 2 Dec 2016 21:08:15 +0000

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