nios2: Fix format complaints and similar diagnostics.
authorSandra Loosemore <sandra@codesourcery.com>
Wed, 17 Mar 2021 21:37:05 +0000 (14:37 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Wed, 17 Mar 2021 21:41:31 +0000 (14:41 -0700)
commit5074c6fa38cef1abb9a355d717b41441a44c4e6a
tree4194a632e179434078cd455748fde90e616654e3
parentbd364aaee338fbc6e3a49043614331ff471e7f4d
nios2: Fix format complaints and similar diagnostics.

The nios2 back end has not been building with newer versions of host
GCC due to several complaints about diagnostic formatting, along with
a couple other warnings.  This patch fixes the errors seen when
building with a host compiler from current mainline head.  I also made
a pass through all the error messages in this file to make them use
more consistent formatting, even where the host compiler was not
specifically complaining.

gcc/
* config/nios2/nios2.c (nios2_custom_check_insns): Clean up
error message format issues.
(nios2_option_override): Likewise.
(nios2_expand_fpu_builtin): Likewise.
(nios2_init_custom_builtins): Adjust to avoid bogus strncpy
truncation warning.
(nios2_expand_custom_builtin): More error message format fixes.
(nios2_expand_rdwrctl_builtin): Likewise.
(nios2_expand_rdprs_builtin): Likewise.
(nios2_expand_eni_builtin): Likewise.
(nios2_expand_builtin): Likewise.
(nios2_register_custom_code): Likewise.
(nios2_valid_target_attribute_rec): Likewise.
(nios2_add_insn_asm): Fix uninitialized variable warning.
gcc/config/nios2/nios2.c