summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-20 14:23:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-20 14:23:11 (GMT)
commit4f37c25271446fec640998b963d3e14d5ca4f953 (patch)
tree1a14a8db3a691a7cd99948b2b48928b5b8757d10
parent112bcf743a85ad7dd6f29b1ce61b4934e838c0a7 (diff)
parent2a08be49c26032c93030a80bab9dd1fcd993bab8 (diff)
downloadtcl-4f37c25271446fec640998b963d3e14d5ca4f953.zip
tcl-4f37c25271446fec640998b963d3e14d5ca4f953.tar.gz
tcl-4f37c25271446fec640998b963d3e14d5ca4f953.tar.bz2
Two more unused arguments.
Merge 8.7
-rw-r--r--generic/tclUtil.c19
-rw-r--r--unix/tclUnixFCmd.c2
2 files changed, 6 insertions, 15 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 6130b1f..5d43029 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -3615,10 +3615,10 @@ TclFormatInt(
* formatted characters are written. */
Tcl_WideInt n) /* The integer to format. */
{
- Tcl_WideInt intVal;
+ Tcl_WideUInt intVal;
int i;
int numFormatted, j;
- const char *digits = "0123456789";
+ static const char digits[] = "0123456789";
/*
* Check first whether "n" is zero.
@@ -3631,27 +3631,16 @@ TclFormatInt(
}
/*
- * Check whether "n" is the maximum negative value. This is -2^(m-1) for
- * an m-bit word, and has no positive equivalent; negating it produces the
- * same value.
- */
-
- intVal = -n; /* [Bug 3390638] Workaround for*/
- if (n == -n || intVal == n) { /* broken compiler optimizers. */
- return sprintf(buffer, "%" TCL_LL_MODIFIER "d", n);
- }
-
- /*
* Generate the characters of the result backwards in the buffer.
*/
- intVal = (n < 0? -n : n);
+ intVal = (n < 0 ? -(Tcl_WideUInt)n : (Tcl_WideUInt)n);
i = 0;
buffer[0] = '\0';
do {
i++;
buffer[i] = digits[intVal % 10];
- intVal = intVal/10;
+ intVal = intVal / 10;
} while (intVal > 0);
if (n < 0) {
i++;
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 3ee116e..9018bd1 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -2507,6 +2507,7 @@ GetUnixFileAttributes(
{
Tcl_StatBuf statBuf;
int result;
+ (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -2549,6 +2550,7 @@ SetUnixFileAttributes(
Tcl_StatBuf statBuf;
int result, readonly;
const char *native;
+ (void)objIndex;
if (Tcl_GetBooleanFromObj(interp, attributePtr, &readonly) != TCL_OK) {
return TCL_ERROR;