From patchwork Tue Nov 6 17:58:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 150316 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4192625ljp; Tue, 6 Nov 2018 09:59:43 -0800 (PST) X-Google-Smtp-Source: AJdET5eRWmsfrpG8fYGkecilI3o7AmnvcqDIcsX2Kk5b7JgEdFcusAk/WDS3HqBu6noZUcYfeTvM X-Received: by 2002:a62:d084:: with SMTP id p126-v6mr28376981pfg.147.1541527182890; Tue, 06 Nov 2018 09:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541527182; cv=none; d=google.com; s=arc-20160816; b=vPtLUGQ3dEgxQvy1d3Y4NCACBVY7e6Q0JI1i2K2gpOvmOF8uL0QSBIvqbLaS15r7ez fUPjcU77NFjC7T1bcXyeb9mAW/ioFC7tZ7xfJ6zSsxXX3TZd7MZ7bOpSLody6Jpx+5UK fMpdLvY8IdtvTP+1O9JNefJvGB2kMwLtk7Qmj3tic5M/D3pY9NfLUBoJN/9Sbjbb3xSe fnwwYriXMZYexY7lDyX3d9LfsRGTxF5RfWlN6ysEqGtWQltI1XdL4py1qx65Gc0cTTxC JhNHpoySrsXPzG3pyMC/Agnv//uI6bEX74dHwUY89maega1Vvfbx/P9pQ9a7vPL8yvbh PoHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=x4pUIq4/SsoHgGQMaxgu4HOJp5mhmvbyCQ/hCLvIm7g=; b=EaC+ShpHPnKpfSIsgLdJKIUl7p8TBj6EPAeYnZjtvqQUaJxEQ5ycw/mKC7vO7K6w4+ tFUL/kMJX+cHAPad1d2qFKX7bElwQ07CEOLox1+dpeawGAKe2uu5E0YhjjggnF/7bVdt cDd7176tuYskLAYCbvdDWG7A06zM4qCBqJK/0d4I26TlEUVF3D57/C84p3PV+UHiZfni mzqZ1ndzWmR6mlO7NfeoaDFLD3vAmCl4dOHX6cpEm15qLBDQZnkN+YTrYE4GVmUBL2rd P0u6jwj/a/H+/qBTfi+OFEeFBgzpWxUqCyey1uOta4/Q/u6fn9X5HGj5CuVH9qGPjZUw QSLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L5vL5cXs; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id q61-v6si40415348plb.418.2018.11.06.09.59.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 09:59:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L5vL5cXs; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 06DCA2118C517; Tue, 6 Nov 2018 09:59:11 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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-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 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: [edk2] [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: , Cc: michael.d.kinney@intel.com, eric.jin@intel.com Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel 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