summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-08 20:47:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-08 20:47:26 (GMT)
commit4b7747b505d177db96c71d43bae93c77f303c568 (patch)
treec9c0d080025a6e35cda260dd58b5c892794a20b2
parente7a40e1084f2d3c711a2aeccccb9b9b40b0c37e7 (diff)
downloadtcl-4b7747b505d177db96c71d43bae93c77f303c568.zip
tcl-4b7747b505d177db96c71d43bae93c77f303c568.tar.gz
tcl-4b7747b505d177db96c71d43bae93c77f303c568.tar.bz2
Fix MSVC warning: warning C4146: unary minus operator applied to unsigned type, result
still unsigned (hopefully)
-rw-r--r--generic/tclObj.c2
1 files changed, 1 insertions, 1 deletions
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;
}