From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=ryszard.knop@linux.intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 72359211C2805 for ; Wed, 30 Jan 2019 08:22:54 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2019 08:22:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,541,1539673200"; d="scan'208";a="130176677" Received: from linux.intel.com ([10.54.29.200]) by orsmga002.jf.intel.com with ESMTP; 30 Jan 2019 08:22:53 -0800 Received: from torii (torii.igk.intel.com [10.102.24.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 406DF580297; Wed, 30 Jan 2019 08:22:52 -0800 (PST) Message-ID: <0e098fbc551d201e22a7d07ef7b1ec955cb61011.camel@linux.intel.com> From: Ryszard Knop To: Ard Biesheuvel , edk2-devel@lists.01.org Cc: kamil.kacperski@intel.com, eric.jin@intel.com, pawel.orlowski@intel.com, michael.d.kinney@intel.com, harry.l.hsiung@intel.com Date: Wed, 30 Jan 2019 17:22:50 +0100 In-Reply-To: <20181115023353.20159-15-ard.biesheuvel@linaro.org> References: <20181115023353.20159-1-ard.biesheuvel@linaro.org> <20181115023353.20159-15-ard.biesheuvel@linaro.org> Organization: Intel Corporation User-Agent: Evolution 3.30.4 Mime-Version: 1.0 Subject: Re: [PATCH edk2-staging 14/20] IntelUndiPkg/XGigUndiDxe: redefine UNREFERENCED_nPARAMETER macros for GCC X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:22:54 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Reviewed-by: Ryszard Knop On Wed, 2018-11-14 at 18:33 -0800, ard.biesheuvela wrote: > Use (VOID) casts to silence unreferenced parameter warnings on GCC. > The > existing macros generate 'statement with no effect' warnings instead, > which does not really help. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > --- > IntelUndiPkg/XGigUndiDxe/ixgbe_type.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/IntelUndiPkg/XGigUndiDxe/ixgbe_type.h > b/IntelUndiPkg/XGigUndiDxe/ixgbe_type.h > index e3bb1a8a313e..f67bfbfc2a9f 100644 > --- a/IntelUndiPkg/XGigUndiDxe/ixgbe_type.h > +++ b/IntelUndiPkg/XGigUndiDxe/ixgbe_type.h > @@ -4411,11 +4411,19 @@ struct ixgbe_hw { > #define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF > > #ifndef UNREFERENCED_XPARAMETER > +#ifdef _MSC_VER > #define UNREFERENCED_XPARAMETER > #define UNREFERENCED_1PARAMETER(_p) (_p); > #define UNREFERENCED_2PARAMETER(_p, _q) (_p); (_q); > #define UNREFERENCED_3PARAMETER(_p, _q, _r) (_p); (_q); (_r); > #define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) (_p); (_q); (_r); > (_s); > +#else > +#define UNREFERENCED_1PARAMETER(_p) (VOID)(_p) > +#define UNREFERENCED_2PARAMETER(_p, _q) (VOID)(_p); (VOID)(_q); > +#define UNREFERENCED_3PARAMETER(_p, _q, _r) (VOID)(_p); (VOID)(_q); > (VOID)(_r); > +#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) (VOID)(_p); > (VOID)(_q); (VOID)(_r); (VOID)(_s); > +#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t) (VOID)(_p); > (VOID)(_q); (VOID)(_r); (VOID)(_s); (VOID)(_t); > +#endif > #endif > #define IXGBE_FUSES0_GROUP(_i) (0x11158 + ((_i) * 4)) > #define IXGBE_FUSES0_300MHZ (1 << 5)