diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-05 12:11:13 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-05 12:11:13 (GMT) |
| commit | 5c9968a001208bb4fc6d06ad040c28bd84b7831f (patch) | |
| tree | d71658efb855b5f330940d518f9cd7ed473b1f9a /generic | |
| parent | fdf1df3b29531c5031a33f2e3c1f4668937c1c5f (diff) | |
| download | tcl-5c9968a001208bb4fc6d06ad040c28bd84b7831f.zip tcl-5c9968a001208bb4fc6d06ad040c28bd84b7831f.tar.gz tcl-5c9968a001208bb4fc6d06ad040c28bd84b7831f.tar.bz2 | |
Minor code cleanup.
win/tclWinPipe.c: Eliminate some compiler warnings on mingw-w64
win/tclWinNotify.c: Eliminate tsdPtr->timeout variable, since it's only being written to.
other files: code cleanup, eliminate unnecessary type casts
Diffstat (limited to 'generic')
| -rw-r--r-- | generic/tclBasic.c | 8 | ||||
| -rw-r--r-- | generic/tclObj.c | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0190c13..71a1442 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -7700,13 +7700,11 @@ ExprWideFunc( Tcl_Obj *const *objv) /* Actual parameter vector. */ { Tcl_WideInt wResult; - Tcl_Obj *objPtr; if (ExprEntierFunc(NULL, interp, objc, objv) != TCL_OK) { return TCL_ERROR; } - objPtr = Tcl_GetObjResult(interp); - TclGetWideBitsFromObj(NULL, objPtr, &wResult); + TclGetWideBitsFromObj(NULL, Tcl_GetObjResult(interp), &wResult); Tcl_SetObjResult(interp, Tcl_NewWideIntObj(wResult)); return TCL_OK; } @@ -7809,7 +7807,7 @@ ExprRandFunc( * Make sure 1 <= randSeed <= (2^31) - 2. See below. */ - iPtr->randSeed &= (unsigned long) 0x7fffffff; + iPtr->randSeed &= 0x7fffffff; if ((iPtr->randSeed == 0) || (iPtr->randSeed == 0x7fffffff)) { iPtr->randSeed ^= 123459876; } @@ -7974,7 +7972,7 @@ ExprSrandFunc( */ iPtr->flags |= RAND_SEED_INITIALIZED; - iPtr->randSeed = (unsigned long) (w & 0x7fffffff); + iPtr->randSeed = (long) w & 0x7fffffff; if ((iPtr->randSeed == 0) || (iPtr->randSeed == 0x7fffffff)) { iPtr->randSeed ^= 123459876; } diff --git a/generic/tclObj.c b/generic/tclObj.c index 490e80e..ce326fe 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -3111,7 +3111,7 @@ Tcl_GetWideIntFromObj( * Attempt to return a wide integer from the Tcl object "objPtr". If the * object is not already a int, double or bignum, an attempt will be made * to convert it to one of these. Out-of-range values don't result in an - * error, but only the least significant 64 bits will be returned. + * error, but only the least significant 64 bits will be returned. * * Results: * The return value is a standard Tcl object result. If an error occurs |
