summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2018-06-08 12:50:43 (GMT)
committersebres <sebres@users.sourceforge.net>2018-06-08 12:50:43 (GMT)
commit04d1270786231c4481e3000d2f98d272c63e90db (patch)
tree89d08ae032fed404f7b1efa51da0eade7e7c37da /generic/tclStringObj.c
parent240e6b50d2dfd9d501eeb3e180be594f51f6f03c (diff)
downloadtcl-04d1270786231c4481e3000d2f98d272c63e90db.zip
tcl-04d1270786231c4481e3000d2f98d272c63e90db.tar.gz
tcl-04d1270786231c4481e3000d2f98d272c63e90db.tar.bz2
resolves some warnings by compiling with new gcc-versions (>= 7.x):
- '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] - passing argument 1 of 'Tcl_CreateExitHandler' from incompatible pointer type [-Wincompatible-pointer-types]
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 67e86c5..996be77 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -113,7 +113,7 @@ typedef struct String {
#define STRING_UALLOC(numChars) \
((numChars) * sizeof(Tcl_UniChar))
#define STRING_SIZE(ualloc) \
- ((unsigned) ((ualloc) \
+ ((unsigned) ((ualloc != 0) \
? (sizeof(String) - sizeof(Tcl_UniChar) + (ualloc)) \
: sizeof(String)))
#define stringCheckLimits(numChars) \