From: Georg-Johann Lay Date: Mon, 20 Jun 2016 10:50:53 +0000 (+0000) Subject: avr.c (avr_print_operand): Fix "format not a string literal" build warnings. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4f26c06c413e70013e4aee2aa45c2ddee83d82a;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e273a260dfc..d7d89449e22 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-06-20 Georg-Johann Lay + + * 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 PR target/71375 diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index d13f4fddcd5..18ed766e0e8 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -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)) {