Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2020-09-20
09:01 • Closed ticket [bf58b04202]: compiler warning in tclEnv.c plus 7 other change... artifact: d0bd532cf3 user: jan.nijtmans
08:59
Fix [bf58b04202]: compiler warning in tclEnv.c check-in: 029d5d91c7 user: jan.nijtmans tags: trunk
2020-09-19
07:56 • New ticket [bf58b04202] compiler warning in tclEnv.c. artifact: b0291bee98 user: chrstphrchvz

compiler warning in tclEnv.c

Closed / Fixedbf58b04202ac37e5e92fa1a338f9e213c763e5b7Created 6 years agoUpdated 6 years ago
Descriptionwiki2020-09-19 07:56:29
There is a warning when tclEnv.c is compiled with -DPURIFY (at least with Xcode 12):
tcl/generic/tclEnv.c:776:16: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        for (i = 0; i < env.cacheSize; i++) {
                    ~ ^ ~~~~~~~~~~~~~
1 warning generated.

This is because i is declared as int whereas env.cacheSize is now size_t in Tcl 9; presumably i should also now be declared as size_t.

Referenced by1
jan.nijtmanswiki2020-09-20 09:01:12

100% right! Thanks! Fixed now.

Log in (anonymous is fine) to add a comment.