compiler warnings in regcomp.c
Closed / Fixed9ffffcbeee43643361435a60e01a2d9661d8e07cCreated 6 years agoUpdated 6 years ago
Descriptionwiki2020-09-19 08:10:50
Warnings for regcomp.c (at least with Xcode 12):
tcl/generic/regcomp.c:479:33: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
assert(wanted > 0 && wanted >= v->nsubs);
~~~~~~ ^ ~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
tcl/generic/regcomp.c:499:19: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
assert(wanted < v->nsubs);
~~~~~~ ^ ~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
2 warnings generated.
wanted is now size_t in Tcl 9; struct vars member nsubs is still int.
Referenced by1
5fc493fe32Fix [9ffffcbeee]: compiler warnings in regcomp.c check-in2020-09-20 09:05:38
jan.nijtmanswiki2020-09-20 09:08:58
Indeed. Thanks! Fixed now in trunk.
Log in (anonymous is fine) to add a comment.