Commit 42c544b0 by Martin Sebor Committed by Martin Sebor

PR bootstrap/82948 - prefix.c:202:15: error: 'char* strncpy(char*, const char*,

   size_t)' destination unchanged after copying no bytes 

gcc/ChangeLog:

	PR bootstrap/82948
	* prefic.c (translate_name): Replace strncpy with memcpy to
	avoid -Wstringop-truncation.

From-SVN: r254658
parent aead609f
2017-11-11 Martin Sebor <msebor@redhat.com>
PR bootstrap/82948
* prefic.c (translate_name): Replace strncpy with memcpy to
avoid -Wstringop-truncation.
2017-11-10 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
......@@ -199,7 +199,7 @@ translate_name (char *name)
;
key = (char *) alloca (keylen + 1);
strncpy (key, &name[1], keylen);
memcpy (key, &name[1], keylen);
key[keylen] = 0;
if (code == '@')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment