This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] fix warnings in sys/select.h fortification with -Wsign-conversion


On Friday 08 June 2012 19:12:20 Roland McGrath wrote:
> > 2012-06-08  Mike Frysinger  <vapier@gentoo.org>
> > 
> > 	* misc/bits/select2.h (__FD_ELT): Cast d to unsigned long int.
> 
> Put D in caps here.

hmm, didn't realize we capped variable names in the changelog

> > --- a/misc/bits/select2.h
> > +++ b/misc/bits/select2.h
> > @@ -27,7 +27,7 @@ extern unsigned long int __fdelt_warn (unsigned long
> > int __d)
> > 
> >  #undef __FD_ELT
> >  #define	__FD_ELT(d) \
> >    __extension__								    \
> > -  ({ unsigned long int __d = (d);					    \
> > +  ({ unsigned long int __d = (unsigned long int) (d);			    \
> 
> I think this merits a comment about why the cast is required.

i was debating on that.  easy enough to add.

> This seems to me like a reasonable candidate to come in despite the
> freeze.

further clarification: this is a glibc-2.15 regression by virtue of this 
fortification logic not existing before that release.  noticed by building a 
package that has a huge number of -W flags combined with -Werror :).

> But then it certainly needs to start with a bugzilla report
> and have that number in the log entry, and then you get to convince
> Carlos that it's an appropriate bug fix.

np
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]