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

2013-04-03 Thread Roland McGrath
Backport committed to gcc-4_8-branch.


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

2013-04-03 Thread Richard Biener
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  
> > 
> > * 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 
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend


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

2013-04-03 Thread Matthew Gretton-Dann

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

Thanks,

Matt

On 25/03/13 18:34, Roland McGrath wrote:

This fixes a gratuitous warning.


Thanks,
Roland


gcc/
2013-03-25  Roland McGrath  

* 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;




--
Matthew Gretton-Dann
Toolchain Working Group, Linaro


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

2013-03-26 Thread Roland McGrath
Committed to trunk.

Thanks,
Roland


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

2013-03-25 Thread Ian Lance Taylor
On Mon, Mar 25, 2013 at 11:34 AM, Roland McGrath  wrote:

> gcc/
> 2013-03-25  Roland McGrath  
>
> * config/arm/arm.c (arm_print_operand: case 'w'): Use fputs rather
> than fprintf with a non-constant, non-format string.

This is OK.

Thanks.

Ian


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

2013-03-25 Thread Roland McGrath
This fixes a gratuitous warning.


Thanks,
Roland


gcc/
2013-03-25  Roland McGrath  

* 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;