diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-12 23:25:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-12 23:25:25 (GMT) |
commit | 031021992f4f8175c8cbe0f7710d790d5f0793a2 (patch) | |
tree | 8377df3061036e6f39d6efd10030113b14de3b46 /generic | |
parent | bb7ee39d95f814300c0965014259a6d7049d8507 (diff) | |
download | tcl-031021992f4f8175c8cbe0f7710d790d5f0793a2.zip tcl-031021992f4f8175c8cbe0f7710d790d5f0793a2.tar.gz tcl-031021992f4f8175c8cbe0f7710d790d5f0793a2.tar.bz2 |
Fix 2 warnings: warning C4018: '>': signed/unsigned mismatch
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBinary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 8b9d510..703c35b 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -406,7 +406,7 @@ Tcl_SetByteArrayLength( length = 0; } byteArrayPtr = GET_BYTEARRAY(objPtr); - if (length > byteArrayPtr->allocated) { + if ((unsigned int)length > byteArrayPtr->allocated) { byteArrayPtr = (ByteArray *)ckrealloc(byteArrayPtr, BYTEARRAY_SIZE(length)); byteArrayPtr->allocated = length; SET_BYTEARRAY(objPtr, byteArrayPtr); @@ -637,7 +637,7 @@ TclAppendBytesToByteArray( } byteArrayPtr = GET_BYTEARRAY(objPtr); - if (len > INT_MAX - byteArrayPtr->used) { + if ((unsigned int)len > INT_MAX - byteArrayPtr->used) { Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); } |