DJ Delorie wrote:
> 
> > --- libiberty/pex-win32.c
> > +++ /tmp/cocci-output-25924-3a75ca-pex-win32.c
> > @@ -547,8 +547,8 @@ env_compare (const void *a_ptr, const vo
> >  
> >    do
> >      {
> > -      c1 = (unsigned char) tolower (*a++);
> > -      c2 = (unsigned char) tolower (*b++);
> > +      c1 = (unsigned char) tolower ((unsigned char)*a++);
> > +      c2 = (unsigned char) tolower ((unsigned char)*b++);
> >  
> >        if (c1 == '=')
> >          c1 = '\0';
> 
> Since the only use of a and b in this function are to pass to tolower,
> changing the type of a and b to unsigned char (and updating the casts
> where they're initialized) would make more sense.

True. This patch was generated with an automated tool (Coccinelle). I
figured that it'd be easiest to send an initial patch and let someone
with a commit bit tweak it as needed. I've never worked with GCC before,
so I have no idea what the style conventions are.

Reply via email to