From 4b7747b505d177db96c71d43bae93c77f303c568 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 8 Oct 2018 20:47:26 +0000 Subject: Fix MSVC warning: warning C4146: unary minus operator applied to unsigned type, result still unsigned (hopefully) --- generic/tclObj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclObj.c b/generic/tclObj.c index a704b52..01a7498 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -3087,7 +3087,7 @@ Tcl_GetWideIntFromObj( value = (value << CHAR_BIT) | *bytes++; } if (big.sign) { - if (value <= -(Tcl_WideUInt)WIDE_MIN) { + if (value <= 1 + ~(Tcl_WideUInt)WIDE_MIN) { *wideIntPtr = - (Tcl_WideInt) value; return TCL_OK; } -- cgit v0.12