[PATCH] Fix -Wformat-security warning in arm.c

Richard Biener rguenther@suse.de
Wed Apr 3 15:11:00 GMT 2013


On Wed, 3 Apr 2013, Matthew Gretton-Dann wrote:

> Is it okay for this patch to be backported to the 4.8 branch?

Yes.

Richard.

> Thanks,
> 
> Matt
> 
> On 25/03/13 18:34, Roland McGrath wrote:
> > This fixes a gratuitous warning.
> > 
> > 
> > Thanks,
> > Roland
> > 
> > 
> > gcc/
> > 2013-03-25  Roland McGrath  <mcgrathr@google.com>
> > 
> > 	* config/arm/arm.c (arm_print_operand: case 'w'): Use fputs rather
> > 	than fprintf with a non-constant, non-format string.
> > 
> > --- a/gcc/config/arm/arm.c
> > +++ b/gcc/config/arm/arm.c
> > @@ -17997,7 +17997,7 @@ arm_print_operand (FILE *stream, rtx x, int code)
> >   	      "wC12",  "wC13",  "wC14",  "wC15"
> >   	    };
> > 
> > -	  fprintf (stream, wc_reg_names [INTVAL (x)]);
> > +	  fputs (wc_reg_names [INTVAL (x)], stream);
> >   	}
> >         return;
> > 
> 
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend



More information about the Gcc-patches mailing list