From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4B5622118C516 for ; Tue, 6 Nov 2018 09:59:09 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id y15-v6so14562040wru.9 for ; Tue, 06 Nov 2018 09:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OgpzoA439HzBv4Gk62XxgoT41vrsXnWZozzW5XcyJhk=; b=L5vL5cXsFT5VzyIyKjwmyPXbk2nFFjQH/eY3wwqvxQtD4JCEVt1V9f1wrUxIUlyskT dkDQZQPNY4jT8NNn1FLdey+fUT+bYDL7ma6lcC3tfGE6tFRg0QC7JxZzg7kVStS8T3v4 B4WABJZU2nM+JqKmwEpAM1i0mCTTanb/rz53w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OgpzoA439HzBv4Gk62XxgoT41vrsXnWZozzW5XcyJhk=; b=BfOKewtbiAUZhcdBSeQQnUfAm4HsXniCrm5Sq+6FCxa/h0NMMB9Y7uv+U1lSSOm3Wr RzWG/QCpY1YsPArfJ3xVx+Ydaa0njdx8nS7AoOharTSHuDqjkLCVpL2/GBui51tiwRYM 7J6XrFRPuSmj3cQL2Cu2VZUrd+/qoBRaOi5cqRKNx+oc8rVVNgNc6NMAgDSVDNup0PXa uI3HvhavYJgD63XFCtnrlqGKOnF+yh/5mhdj9PeH/3+DLNxziuW9O0gSCVDnoTpeAaOS 2I8Cr3GlcokDZxD9+Z6ykqlZNU1hhBChb2oKbpdfArkCD0g6xeH3FUj3DPzBkSw0RU+v 8UvA== X-Gm-Message-State: AGRZ1gLHCP+D0tCFwGYe5PlNzo6YL/IG6kYP1TCkHcSC4OxfZ3GdCVwu uvnDLPRBixIxd7+WSHcyePzqAaWqf5U= X-Google-Smtp-Source: AJdET5eTYe5WmeKVQjuimC99JL4wOsc/z7l8PPu5GxEPXnRODta2WNS77McothTauR2Qc8AXOOuc1Q== X-Received: by 2002:adf:e84e:: with SMTP id d14-v6mr21357656wrn.51.1541527147669; Tue, 06 Nov 2018 09:59:07 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr. [92.154.90.120]) by smtp.gmail.com with ESMTPSA id 134-v6sm2971522wmp.6.2018.11.06.09.59.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 09:59:06 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: maciej.rabeda@intel.com, michael.d.kinney@intel.com, eric.jin@intel.com, leif.lindholm@linaro.org, Ard Biesheuvel Date: Tue, 6 Nov 2018 18:58:28 +0100 Message-Id: <20181106175833.26964-15-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181106175833.26964-1-ard.biesheuvel@linaro.org> References: <20181106175833.26964-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [PATCH edk2-staging 14/19] IntelUndiPkg/GigUndiDxe: 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: Tue, 06 Nov 2018 17:59:09 -0000 Content-Transfer-Encoding: 8bit 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/GigUndiDxe/e1000_defines.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/IntelUndiPkg/GigUndiDxe/e1000_defines.h b/IntelUndiPkg/GigUndiDxe/e1000_defines.h index 1d07d30aa18e..b9ce1e5e6339 100644 --- a/IntelUndiPkg/GigUndiDxe/e1000_defines.h +++ b/IntelUndiPkg/GigUndiDxe/e1000_defines.h @@ -1622,12 +1622,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif /* NO_82575_SUPPORT */ #ifndef UNREFERENCED_XPARAMETER -#define UNREFERENCED_XPARAMETER +#ifdef _MSC_VER #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); #define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t) (_p); (_q); (_r); (_s); (_t); +#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 /* UNREFERENCED_XPARAMETER */ #ifndef E1000_UNUSEDARG #define E1000_UNUSEDARG -- 2.19.1