This fixes a compile time error triggered by -Werror=format-security because
authorNick Clifton <nickc@redhat.com>
Thu, 27 Mar 2014 09:41:06 +0000 (09:41 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 27 Mar 2014 09:41:06 +0000 (09:41 +0000)
a call to sprintf was being made with a non-constant formatting string.

* config/tc-score.c (s3_parse_pce_inst): Add "%s" parameter to
sprintf in order to avoid a compile time warning.

gas/ChangeLog
gas/config/tc-score.c

index 38362f5d07a5f6156554cb3a7dabef67265caa86..bdb7c2fd015fd757cc15b05d8af3c07c5154932d 100644 (file)
@@ -1,3 +1,8 @@
+2014-03-27  Nick Clifton  <nickc@redhat.com>
+
+       * config/tc-score.c (s3_parse_pce_inst): Add "%s" parameter to
+       sprintf in order to avoid a compile time warning.
+
 2014-03-26  Nick Clifton  <nickc@redhat.com>
 
        * config/tc-rl78.c (rl78_op): Issue an error message if a 16-bit
index 8ca273c67de7f910c0dba28cbe42cc52afa48a89..6242b8c5b8eb76712beffb118f554c551283d848 100644 (file)
@@ -5363,7 +5363,7 @@ s3_parse_pce_inst (char *insnstr)
         || ((pec_part_1.size == s3_INSN16_SIZE) && (s3_inst.size == s3_INSN_SIZE)))
     {
       s3_inst.error = _("pce instruction error (16 bit || 16 bit)'");
-      sprintf (s3_inst.str, insnstr);
+      sprintf (s3_inst.str, "%s", insnstr);
       return;
     }
 
This page took 0.027577 seconds and 4 git commands to generate.