Commit b4f26c06 by Georg-Johann Lay Committed by Georg-Johann Lay

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
parent ba70141d
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> 2016-06-19 David Edelsohn <dje.gcc@gmail.com>
PR target/71375 PR target/71375
......
...@@ -2170,7 +2170,7 @@ avr_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr) ...@@ -2170,7 +2170,7 @@ avr_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr)
switch (GET_CODE (addr)) switch (GET_CODE (addr))
{ {
case REG: case REG:
fprintf (file, ptrreg_to_str (REGNO (addr))); fprintf (file, "%s", ptrreg_to_str (REGNO (addr)));
break; break;
case PRE_DEC: case PRE_DEC:
...@@ -2284,12 +2284,12 @@ avr_print_operand (FILE *file, rtx x, int code) ...@@ -2284,12 +2284,12 @@ avr_print_operand (FILE *file, rtx x, int code)
else if (code == 'E' || code == 'F') else if (code == 'E' || code == 'F')
{ {
rtx op = XEXP(x, 0); 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') else if (code == 'I' || code == 'J')
{ {
rtx op = XEXP(XEXP(x, 0), 0); 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)) else if (REG_P (x))
{ {
...@@ -2298,7 +2298,7 @@ avr_print_operand (FILE *file, rtx x, int code) ...@@ -2298,7 +2298,7 @@ avr_print_operand (FILE *file, rtx x, int code)
else if (code == 'r' && REGNO (x) < 32) else if (code == 'r' && REGNO (x) < 32)
fprintf (file, "%d", (int) REGNO (x)); fprintf (file, "%d", (int) REGNO (x));
else else
fprintf (file, reg_names[REGNO (x) + abcd]); fprintf (file, "%s", reg_names[REGNO (x) + abcd]);
} }
else if (CONST_INT_P (x)) else if (CONST_INT_P (x))
{ {
......
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