From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83993 invoked by alias); 30 Mar 2015 14:00:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 83983 invoked by uid 89); 30 Mar 2015 14:00:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Mar 2015 14:00:24 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YcaEm-0006uq-DM from Tom_deVries@mentor.com ; Mon, 30 Mar 2015 07:00:20 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Mon, 30 Mar 2015 14:59:20 +0100 Message-ID: <551956B6.4030805@mentor.com> Date: Mon, 30 Mar 2015 14:00:00 -0000 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Arnaud Charlet CC: GCC Patches Subject: [PATCH][ada][PR65490] Fix bzero warning in child_setup_tty Content-Type: multipart/mixed; boundary="------------000805010701070708080006" X-SW-Source: 2015-03/txt/msg01552.txt.bz2 --------------000805010701070708080006 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-length: 309 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 --------------000805010701070708080006 Content-Type: text/x-patch; name="0001-Fix-bzero-warning-in-child_setup_tty.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-bzero-warning-in-child_setup_tty.patch" Content-length: 761 Fix bzero warning in child_setup_tty 2015-03-30 Tom de Vries 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 --------------000805010701070708080006--