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/tclBasic.c | |
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/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 8 |
1 files changed, 3 insertions, 5 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; } |