From: Michael McConville <mmcco@mykolab.com>
To: DJ Delorie <dj@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] ctype functions and signedness
Date: Tue, 17 Nov 2015 00:24:00 -0000 [thread overview]
Message-ID: <20151117002403.GB32191@thinkpad.swarthmore.edu> (raw)
In-Reply-To: <201511170018.tAH0IEAw001995@greed.delorie.com>
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.
next prev parent reply other threads:[~2015-11-17 0:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 15:59 Michael McConville
2015-11-17 0:18 ` DJ Delorie
2015-11-17 0:24 ` Michael McConville [this message]
2015-11-24 23:15 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151117002403.GB32191@thinkpad.swarthmore.edu \
--to=mmcco@mykolab.com \
--cc=dj@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).