From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 782 invoked by alias); 7 Jan 2015 18:36:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 768 invoked by uid 89); 7 Jan 2015 18:36:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Jan 2015 18:36:13 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id CE233333738CE; Wed, 7 Jan 2015 18:36:07 +0000 (GMT) Received: from BAMAIL02.ba.imgtec.org (10.20.40.28) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 7 Jan 2015 18:36:11 +0000 Received: from [192.168.65.53] (192.168.65.53) by bamail02.ba.imgtec.org (10.20.40.28) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 7 Jan 2015 10:36:07 -0800 Message-ID: <1420655766.15691.44.camel@ubuntu-sellcey> Subject: Re: [Patch] Fix build problem with system call in compile/compile.c From: Steve Ellcey Reply-To: To: Joel Brobecker CC: , Yao Qi , Chen Gang Date: Wed, 07 Jan 2015 18:36:00 -0000 In-Reply-To: <20150107041351.GN5445@adacore.com> References: <20150106041615.GJ5445@adacore.com> <1420560255.15691.21.camel@ubuntu-sellcey> <20150107041351.GN5445@adacore.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00131.txt.bz2 On Wed, 2015-01-07 at 08:13 +0400, Joel Brobecker wrote: > > > Does it work to cast the result of the call to system to (void) > > > instead? In your case, I fear that you'd be exchanging one warning > > > (return value being ignored) by another (value assigned but never > > > used). > > > > No, I tried using "(void) system (zap);" instead of "i = system (zap);" > > and I still got the warning message. > > In that case, I have no objection to your patch either, provided > a small comment is added to explain why we allow ourselves to ignore > the return value (and since you'll be touching that code anyways, > I would also rename your variable to something more explicit, such > as "ignored" or "unused" for instance). > > Thank you, I am not sure why we allow ourselves to ignore the return value. Maybe we shouldn't. Chen Gang submitted a different patch where the return value is checked. Should we use that instead? https://sourceware.org/ml/gdb-patches/2015-01/msg00011.html Steve Ellcey sellcey@imgtec.com