Dear fellow Tcl'ers

This message is more specifically meant for Harald. Thank you Harald for your efforts as a driving force in the current process of having Tcl9.0 out

I've built rivet branch tcl-novem with Tcl9 (branch tcl-9-0-b1-rc) and as expected I had to get all the Tcl_Size replace int where the compiler found potentially incompatible representations. That was straightforward.

everything was right except for this warning (compiling with gcc 13.2.0)

mod_rivet_ng/TclWebapache.c: In function ‘TclWeb_StringToUtf’:
/home/manghi/tcltk/include/tclDecls.h:3972:47: warning: right-hand operand of comma expression has no effect [-Wunused-value] 3971 | (Tcl_ExternalToUtfDStringEx(NULL, (encoding), (src), (len), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3972 | TCL_ENCODING_PROFILE_TCL8, (ds), NULL), Tcl_DStringValue(ds)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ mod_rivet_ng/TclWebapache.c:803:5: note: in expansion of macro ‘Tcl_ExternalToUtfDString’
  803 |     Tcl_ExternalToUtfDString(NULL,in,(signed)strlen(in),&dstr);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~

The relevant macro in tclDecls.h

#define Tcl_ExternalToUtfDString(encoding, src, len, ds) \
        (Tcl_ExternalToUtfDStringEx(NULL, (encoding), (src), (len), \
        TCL_ENCODING_PROFILE_TCL8, (ds), NULL), Tcl_DStringValue(ds))

which expands Tcl_ExternalToUtfDString(encoding, src, len, ds) as

(Tcl_ExternalToUtfDString(....),Tcl_DStringValue(ds))

where apparently the function call on the right of the comma has no meaningful purpose, as it returns the string internal value which goes unassigned.

Probably a minor problem but I thought the Tcl includes shouldn't in principle generate unnecessary noise

 -- Massimo

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to