From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A526021A16ECF for ; Tue, 20 Jun 2017 12:56:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32E57883A6; Tue, 20 Jun 2017 19:57:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 32E57883A6 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 32E57883A6 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-150.phx2.redhat.com [10.3.116.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3765661F21; Tue, 20 Jun 2017 19:57:29 +0000 (UTC) To: Ard Biesheuvel Cc: Leif Lindholm , "edk2-devel@lists.01.org" , Ryan Harkin References: <20170620110008.24413-1-leif.lindholm@linaro.org> <20170620120046.GZ26676@bivouac.eciton.net> From: Laszlo Ersek Message-ID: <7b100a93-eafc-651a-515d-6cc329a99a35@redhat.com> Date: Tue, 20 Jun 2017 21:57:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 20 Jun 2017 19:57:30 +0000 (UTC) Subject: Re: [PATCH] ArmPlatformPkg: eliminate Juno gcc build warning X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:56:07 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 06/20/17 21:52, Ard Biesheuvel wrote: > On 20 June 2017 at 17:44, Laszlo Ersek wrote: >> Perhaps we should introduce two macros to "MdePkg/Include/Base.h", >> >> #define UNUSED_POINTER NULL >> #define UNUSED_INTEGER 0 >> >> These could be used to suppress such warnings, without the risk of >> misleading programmers (as to the real necessity of the variable >> assignment at hand). >> > > Or perhaps > > #ifdef __GNUC__ > #define USED(var) var = (typeof(var))0 > #else > #define USED(var) > #endif > Sure, why not :)