 <p>I do not know why the accepted answer was selected, it does not remove any warnings when I run this code....</p> <p>I cannot confirm on your specific platform, but adding casts to each string constant has made the warnings go away for me.</p> <pre><code>#include &lt;unistd.h&gt; main() { char* const args[] = {(char*)"/bin/ls", (char*)"-r", (char*)"-t", (char*)"-l", (char*) 0 }; execv("/bin/ls", args); } </code></pre> <p>OR</p> <pre><code>#include &lt;unistd.h&gt; main() { char *args[] = {(char*)"/bin/ls", (char*)"-r", (char*)"-t", (char*)"-l", (char*) 0 }; execv("/bin/ls", args); } </code></pre> <p>It may be overly verbose and annoying, but the warnings go away.</p> <p>I'm running this on: g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4</p>