avr.c (avr_print_operand): Fix "format not a string literal" build warnings.

* config/avr/avr.c (avr_print_operand): Fix "format not a string
	literal" build warnings.
	(avr_print_operand_address): Dito.

From-SVN: r237588
This commit is contained in:
Georg-Johann Lay 2016-06-20 10:50:53 +00:00 committed by Georg-Johann Lay
parent ba70141da3
commit b4f26c06c4
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2016-06-20 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.c (avr_print_operand): Fix "format not a string
literal" build warnings.
(avr_print_operand_address): Dito.
2016-06-19 David Edelsohn <dje.gcc@gmail.com>
PR target/71375

View File

@ -2170,7 +2170,7 @@ avr_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr)
switch (GET_CODE (addr))
{
case REG:
fprintf (file, ptrreg_to_str (REGNO (addr)));
fprintf (file, "%s", ptrreg_to_str (REGNO (addr)));
break;
case PRE_DEC:
@ -2284,12 +2284,12 @@ avr_print_operand (FILE *file, rtx x, int code)
else if (code == 'E' || code == 'F')
{
rtx op = XEXP(x, 0);
fprintf (file, reg_names[REGNO (op) + ef]);
fprintf (file, "%s", reg_names[REGNO (op) + ef]);
}
else if (code == 'I' || code == 'J')
{
rtx op = XEXP(XEXP(x, 0), 0);
fprintf (file, reg_names[REGNO (op) + ij]);
fprintf (file, "%s", reg_names[REGNO (op) + ij]);
}
else if (REG_P (x))
{
@ -2298,7 +2298,7 @@ avr_print_operand (FILE *file, rtx x, int code)
else if (code == 'r' && REGNO (x) < 32)
fprintf (file, "%d", (int) REGNO (x));
else
fprintf (file, reg_names[REGNO (x) + abcd]);
fprintf (file, "%s", reg_names[REGNO (x) + abcd]);
}
else if (CONST_INT_P (x))
{