Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-11-23
13:22 • Closed ticket [afa3c10ddf]: Tcltest build compiler warning plus 6 other chan... artifact: 3f5cd099f5 user: jan.nijtmans
2023-11-13
19:26 • Ticket [afa3c10ddf]: 4 changes artifact: 233b09852d user: jan.nijtmans
18:01 • New ticket [afa3c10ddf]. artifact: 7ef0926193 user: dgp

Tcltest build compiler warning

Closed / Fixedafa3c10ddf69390d089d8b89c24a459081a957f3Created 3 years agoUpdated 3 years ago
Descriptionplain2023-11-13 18:01:44
Building the Tcltest trunk:

/home/dgp/fossil/tcl/generic/tclTest.c: In function ‘TestbytestringObjCmd’:
/home/dgp/fossil/tcl/generic/tclTest.c:5795:5: warning: passing argument 3 of ‘tclStubsPtr->tcl_GetBytesFromObj’ from incompatible pointer type [enabled by default]
     p = (const char *)Tcl_GetBytesFromObj(interp, objv[1], &x.n);
     ^
/home/dgp/fossil/tcl/generic/tclTest.c:5795:5: note: expected ‘Tcl_Size *’ but argument is of type ‘int *’


Looking at the code, this might be intentional, and that might have value,
but it also departs from the quality metric of aiming to have Tcl build
free of compiler errors and warnings.

Reported just so the issue is on the record.  I'll defer to those engaged
in the work.
jan.nijtmanswiki2023-11-13 19:26:19

This testcase tests the Compatibility macro from Tcl_GetBytesFromObj(), which - starting with TIP #664 - emits this warning. TIP #661 (soon to be Voted on, and - probably will be accepted), will further cripple this macro. Probably the best action here is just to remove this testcase.

I'll handle it as soon as TIP #661 is decided upon (Unless Rolf handles it first).

jan.nijtmanswiki2023-11-23 13:22:20

Testcase is removed now

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