From: Tom de Vries <Tom_deVries@mentor.com>
To: Arnaud Charlet <charlet@adacore.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH][ada][PR65490] Fix bzero warning in child_setup_tty
Date: Mon, 30 Mar 2015 14:00:00 -0000 [thread overview]
Message-ID: <551956B6.4030805@mentor.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
Hi,
This patch fixes the warning:
...
terminals.c:1266:21: warning: argument to âsizeofâ in âbzeroâ call is the same
expression as the destination; did you mean to remove the addressof?
[-Wsizeof-pointer-memaccess]
...
bootstrapped and reg-tested on x86_64.
OK for stage 4/stage1?
Thanks,
- Tom
[-- Attachment #2: 0001-Fix-bzero-warning-in-child_setup_tty.patch --]
[-- Type: text/x-patch, Size: 761 bytes --]
Fix bzero warning in child_setup_tty
2015-03-30 Tom de Vries <tom@codesourcery.com>
PR ada/65490
* terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
bzero call is the same expression as the destination'.
---
gcc/ada/terminals.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
index a46e610..eaaf1c2 100644
--- a/gcc/ada/terminals.c
+++ b/gcc/ada/terminals.c
@@ -1262,8 +1262,8 @@ child_setup_tty (int fd)
struct termios s;
int status;
- /* ensure that s is filled with 0 */
- bzero (&s, sizeof (&s));
+ /* Ensure that s is filled with 0. */
+ bzero (&s, sizeof (s));
/* Get the current terminal settings */
status = tcgetattr (fd, &s);
--
1.9.1
next reply other threads:[~2015-03-30 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 14:00 Tom de Vries [this message]
2015-03-31 7:58 ` Arnaud Charlet
2015-03-31 7:59 ` Arnaud Charlet
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=551956B6.4030805@mentor.com \
--to=tom_devries@mentor.com \
--cc=charlet@adacore.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).