When I feed the program <br><br>#include &lt;stdlib.h&gt;<br>int main(void){<br><br>&nbsp; /*@unused@*/&nbsp; const char *p=&quot;a&quot;;<br>&nbsp; /*@unused@*/ char *x=p;<br>&nbsp; return EXIT_SUCCESS;<br>}<br clear="all"><br>to splint +checks, it gives me no warning. But when I compile it with gcc, I am warned that 
<br><br>&quot;test.c:5: warning: initialization discards qualifiers from pointer target type&quot;.<br><br>However, when I feed to splint the program <br><br>#include &lt;stdlib.h&gt;<br>int main(void){<br>&nbsp; /*@unused@*/ char const * const teststringarray[]={&quot;a&quot;};
<br>&nbsp; return EXIT_SUCCESS;<br>}<br>, splint warns me that <br><br>test.c: (in function main)<br>test.c:3:54: Read-only string literal storage used as initial value for<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unqualified storage: teststringarray[0] = &quot;a&quot;
<br>&nbsp; A read-only string literal is assigned to a non-observer reference. (Use<br>&nbsp; -readonlytrans to inhibit warning)<br><br>, while gcc warns me of nothing (except that the variable teststringarray is unused). <br><br>The behavior in the program is bugging me (I have similar case in a real program). Why does this happen? There is nothing wrong or suspect in initializing with a string literal an array of const pointers to constants (const * const) How can I fix this? In the manual, I only found something about /*@observer@*/, but this seems absurd, since I am not dealing with an abstract type. 
<br><br>Thanks in advance.<br><br>-- <br>Software is like sex: it is better when it is free.