From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Subject: [RFC] Casting NULL pointer
Date: Sun, 30 Aug 2015 10:09:00 -0000 [thread overview]
Message-ID: <20150830100944.GA3916@embecosm.com> (raw)
There are a small (~26) number of places where the NULL pointer is
cast list this:
char *wname = (char *) NULL;
This compares to a huge number of places (~726) where we don't use a
cast, so:
const char *name = NULL;
I've never thought that the cast was either necessary or a
particularly good idea, it feels like unneeded clutter.
I only ask because I was about to push an obvious change that made a
minor edit to a line containing one of the above casts. I was tempted
to remove the cast, in this case, as a clean up; however, I'm looking
for confirmation that such a change would be viewed as clean up, and
not an unnecessary change.
As a follow on, given the small number, I'm happy to submit a
patch(es) to remove all of these casts, if its felt that would be a
reasonable clean up.
Thanks,
Andrew
next reply other threads:[~2015-08-30 10:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-30 10:09 Andrew Burgess [this message]
2015-08-30 12:33 ` Mark Kettenis
2015-08-30 13:46 ` Andrew Burgess
2015-08-30 16:06 ` Doug Evans
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=20150830100944.GA3916@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.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