<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 17, 2019 at 9:22 AM Henri Menke <<a href="mailto:henrimenke@gmail.com">henrimenke@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
In C nothing is really const, but fair enough. Maybe the attached patch<br>
is better.<br>
<br>
<br>
</blockquote></div><div><br></div><div>source/README.6coding<br></div><div><br></div><div><br></div><div>What must be avoided with 'const'</div><div>.................................</div><div><br></div><div>The GCC compiler warnings "assignment discards qualifiers..." and</div><div>analogous warnings for "initialization", "passing arg", or "return" must</div><div>be strenously avoided in our own code. The only exception is when they</div><div>are caused by X11 headers or macros or other third party code.</div><div><br></div><div>What should be avoided with 'const'</div><div>...................................</div><div><br></div><div>A type cast, e.g., from 'const char*' to 'char*' does not solve any</div><div>problems; depending on warning options, it may only hide them.</div><div>Therefore such casts should be avoided whenever possible and otherwise</div><div>must be carefully analyzed to make sure that they cannot cause the</div><div>modification of quantities supposed to be constant.</div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">luigi<br></div></div></div></div>