summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authordas <das>2006-07-20 06:17:38 (GMT)
committerdas <das>2006-07-20 06:17:38 (GMT)
commitf2a1ea5dbae4b3440723227e75a0c9da1d88ff93 (patch)
treeb705c8427d769d47111756d48dc62a7053128fac /generic/tclObj.c
parent475cf649d6dfe709736b11ba805cba2827753363 (diff)
downloadtcl-f2a1ea5dbae4b3440723227e75a0c9da1d88ff93.zip
tcl-f2a1ea5dbae4b3440723227e75a0c9da1d88ff93.tar.gz
tcl-f2a1ea5dbae4b3440723227e75a0c9da1d88ff93.tar.bz2
* generic/regc_locale.c (cclass):
* generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOCmd.c (Tcl_ExecObjCmd): * generic/tclListObj.c (NewListIntRep): * generic/tclObj.c (Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, FreeBignum, Tcl_SetBignumObj): * generic/tclParseExpr.c (Tcl_ParseExpr): * generic/tclStrToD.c (TclParseNumber): * generic/tclStringObj.c (TclAppendFormattedObjs): * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 7d89f98..521a49b 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.108 2006/06/21 03:10:39 dgp Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.109 2006/07/20 06:17:39 das Exp $
*/
#include "tclInt.h"
@@ -158,7 +158,7 @@ static Tcl_ThreadDataKey pendingObjDataKey;
}
#define UNPACK_BIGNUM(objPtr, bignum) \
- if ((objPtr)->internalRep.ptrAndLongRep.value == -1) { \
+ if ((objPtr)->internalRep.ptrAndLongRep.value == (unsigned long)(-1)) { \
(bignum) = *((mp_int *) ((objPtr)->internalRep.ptrAndLongRep.ptr)); \
} else { \
(bignum).dp = (mp_digit*) (objPtr)->internalRep.ptrAndLongRep.ptr; \
@@ -2171,7 +2171,7 @@ Tcl_GetLongFromObj(
mp_int big;
UNPACK_BIGNUM(objPtr, big);
- if (big.used <= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1)
+ if ((size_t)(big.used) <= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1)
/ DIGIT_BIT) {
unsigned long value = 0, numBytes = sizeof(long);
long scratch;
@@ -2470,8 +2470,8 @@ Tcl_GetWideIntFromObj(
mp_int big;
UNPACK_BIGNUM(objPtr, big);
- if (big.used <= (CHAR_BIT * sizeof(Tcl_WideInt) + DIGIT_BIT - 1)
- / DIGIT_BIT) {
+ if ((size_t)(big.used) <= (CHAR_BIT * sizeof(Tcl_WideInt)
+ + DIGIT_BIT - 1) / DIGIT_BIT) {
Tcl_WideUInt value = 0;
unsigned long numBytes = sizeof(Tcl_WideInt);
Tcl_WideInt scratch;
@@ -2524,7 +2524,7 @@ FreeBignum(
UNPACK_BIGNUM(objPtr, toFree);
mp_clear(&toFree);
- if (objPtr->internalRep.ptrAndLongRep.value < 0) {
+ if ((long)(objPtr->internalRep.ptrAndLongRep.value) < 0) {
ckfree((char *)objPtr->internalRep.ptrAndLongRep.ptr);
}
}
@@ -2871,7 +2871,7 @@ Tcl_SetBignumObj(
if (Tcl_IsShared(objPtr)) {
Tcl_Panic("Tcl_SetBignumObj called with shared object");
}
- if (bignumValue->used
+ if ((size_t)(bignumValue->used)
<= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT) {
unsigned long value = 0, numBytes = sizeof(long);
long scratch;
@@ -2895,7 +2895,7 @@ Tcl_SetBignumObj(
}
tooLargeForLong:
#ifndef NO_WIDE_TYPE
- if (bignumValue->used
+ if ((size_t)(bignumValue->used)
<= (CHAR_BIT * sizeof(Tcl_WideInt) + DIGIT_BIT - 1) / DIGIT_BIT) {
Tcl_WideUInt value = 0;
unsigned long numBytes = sizeof(Tcl_WideInt);