On 08/09/2021 10:14, David Restall via Exim-users wrote:
Granted (I did allude to this in the email) but what actually is the problem that it is masking ?
The problem arises from a program of constification of the Exim source. That is, using the 'C' const qualifer to mark up variables that we think should not be modified, so that the compiler can a) static-check that assertion, and b) possibly generate more efficient code. It's a long and difficult job, and still in progress. The filter modules are particularly difficult because they were written in a different style, and one I personally find rather abstruse. So the current boundary of the constification effort has reached those commented points.
I didn't dig all the way through the code and have no idea what the variables do (s ? absolutely stupid name that _REALLY_ helps debugging for instance) & why does it need to be const :-)
"s" is the project-standard name for a string pointer. It generally has a short lifetime.
) If the comments are correct and losing track of const is known about then surely it can't be a big problem
Wrong.
so why not just cast the result to resolve the warning or remove the constness ?
Because the wish is to introduce, where appropriate, const-ness.
If it's a big issue, then innocuous comments are not helpful and the problem should be resolved. Whichever way you look at it, it's sloppy code and that should not be dismissed with a glib response.
Feel free to donate your time and expertise to the effort. -- Cheers, Jeremy -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
