diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2021-03-19 15:57:06 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2021-03-19 15:57:06 +0000 |
commit | 22d1a90a1526a77585333bd6c7d9bfc1a9cbdffa (patch) | |
tree | e7f14a7787a3c47ac0cfa4dd6cf7221900c78211 /gcc | |
parent | c3a2bc6daaa2d278cb5f323e2df4b8c2af4198ac (diff) | |
download | gcc-22d1a90a1526a77585333bd6c7d9bfc1a9cbdffa.zip gcc-22d1a90a1526a77585333bd6c7d9bfc1a9cbdffa.tar.gz gcc-22d1a90a1526a77585333bd6c7d9bfc1a9cbdffa.tar.bz2 |
Use memcpy instead of strncpy to avoid error with -Werror=stringop-truncation.
gcc/ChangeLog:
* config/pa/pa.c (import_milli): Use memcpy instead of strncpy.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/pa/pa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index d7fcd11..46194ba 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -5950,7 +5950,7 @@ import_milli (enum millicodes code) { imported[(int) code] = 1; strcpy (str, import_string); - strncpy (str + MILLI_START, milli_names[(int) code], 4); + memcpy (str + MILLI_START, milli_names[(int) code], 4); output_asm_insn (str, 0); } } |