[PATCH][ada][PR65490] Fix bzero warning in child_setup_tty

Arnaud Charlet charlet@adacore.com
Tue Mar 31 07:59:00 GMT 2015


> > -  /* ensure that s is filled with 0 */
> > -  bzero (&s, sizeof (&s));
> > +  /* Ensure that s is filled with 0.  */
> 
> Please keep the comment as is, we do not put dots on single partial sentences
> (otherwise you would have to change these everywhere, and you and I do not
> really want that).
> 
> > +  bzero (&s, sizeof (s));
> 
> the above single line change is OK for stage 4, thanks.

Plus the copyright update (to 2015).

--
--- terminals.c (revision 313797)
+++ terminals.c (working copy)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *                     Copyright (C) 2008-2014, AdaCore                     *
+ *                     Copyright (C) 2008-2015, AdaCore                     *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -1263,7 +1263,7 @@
   int    status;

   /* ensure that s is filled with 0 */
-  bzero (&s, sizeof (&s));
+  bzero (&s, sizeof (s));

   /* Get the current terminal settings */
   status = tcgetattr (fd, &s);



More information about the Gcc-patches mailing list