From patchwork Thu Nov 15 02:33:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 151151 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6453951ljp; Wed, 14 Nov 2018 18:35:03 -0800 (PST) X-Google-Smtp-Source: AJdET5dA1cu1B6/tLRjPhSadADfiWO39uSIo4Hlw8s4OcQCV4D0mjntUHC7v5BzN4iWg8zWQSzMe X-Received: by 2002:a63:fb46:: with SMTP id w6mr4141197pgj.321.1542249303066; Wed, 14 Nov 2018 18:35:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542249303; cv=none; d=google.com; s=arc-20160816; b=Ix1GOW7DKNqKEHdDfYj2SC8cTpFL++BCnKy8ukfZfixI/EbYQ3Jy+qWGKxhKIDUXxL dGOkAbWp70BJiBH0KiiP8d1i7YPmxWnJYfQM9uVLbom4kvyFwHblVWGI/K15ySp70s2j 9yUQZpGsrqfcUxYS2hhO0iTLVJOUSE/N9bY8r54azzC7cKZ/CkxMiY6rlhoWam8qx73v 7qgMpoweS8+ztc64vA80npVgcJvZDmoOJXw2+v7qHWZX4EkbMt/E66N8v2GDQhGRACdz h5fysXmU+/UAXLT/VP6e6IN5ErjXk2WXIxnzKT3sd4+K6f5XtNwhF2ucsHhDSH6neQOk Heuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=zclBwa169wxWC+TzyYxFIzbZho74XlPhNMPXfwLbSgg=; b=zcq3xGe/tcHRRw8QIW3U0+370s08rNsApVdXjUhG57YO6t7084YB1tBCUTBgple7BC ETWaET1Ax7UvX4p96YwNq2nCovRGvzEhSIG+k1ASEST2Y34YgsqR9SDiY+fkUwX9ol+F Z+N7doWmaFbY8qc+X5rWip5bt58VsUK62HStXoUi8iYGlJH/H2msrIxxggx1/j8IMxsv yP3+Qk9l9PriADk0fQW9PHu1aVjsampobkPmkEkg7PYl3SUvBPscDN6Ga5TBZpQlO66t v05161C3DzQ+UrkOTqUNTGkw2kjJMD9j5DiVVYdyed/x9JVJ7AO3sGe5mya9LsUSJorE hUig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="S/qS0trY"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 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. [198.145.21.10]) by mx.google.com with ESMTPS id y5-v6si22869124pfk.172.2018.11.14.18.35.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 18:35:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="S/qS0trY"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 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 9666B2119172C; Wed, 14 Nov 2018 18:34:20 -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=2607:f8b0:4864:20::643; helo=mail-pl1-x643.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (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 9DBCA21CAD998 for ; Wed, 14 Nov 2018 18:34:18 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id y6-v6so1152949plt.3 for ; Wed, 14 Nov 2018 18:34:18 -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; bh=8YU++YDkDZ9tsKYEAXS4ooUFkn4YXy1Y/XZGtjjRdyI=; b=S/qS0trYIwYqRTB/HArPixjm/3/0HIp6FHt7Y8cCkkDPRPrtkM+LDhl1xYU3/C1uYX 4Bd/rUwVuninkKPDREGXQFwpW3aauf0O9bKNDlfwZv24YADeYwdqy8VSxHVdyB2Oy2t5 nSb6HKIG/eA6UuKAw0Qzx9ir1/4zV7Vxfy/ZU= 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; bh=8YU++YDkDZ9tsKYEAXS4ooUFkn4YXy1Y/XZGtjjRdyI=; b=T/sozSodpNURkuYcMrTQCw1KZhoUv/Z1aAyZjkhVq8/7DaLvNpdKE7R8iPzOy9kmjf PWXgiipadKdCTFKooNVbC7mGJ5h/4koIPu2gjJdp0EGz94uiWCHZAxWgGPrCHF9cJe1P 0ezweIu8u2Q2jcCvrWr1GKcQvHUoqs32NkC1XaylCx5kb4VAwcCnwiI910TALBiqUGT7 zEmBvsGbobH+ZjiUU6GZm3N8PuvYXrbw8XWEvK0Wl69N4EIbEjtz6dqajMuiVSxgaH6m sFPE612GUZLq8lU3T72BuiCa6hEU1SIwDyPvxyJqI/zBEj3mxDOKzZNHkV3zBHG2/cwH ByFg== X-Gm-Message-State: AGRZ1gLb8ON3G/108H20DSQTmGLXvaf8IzDWDuVuDpdSwsHmaUzK4Cc7 gziWtvpWxXLvro1OHKIwan3OtGq7Jr9tKg== X-Received: by 2002:a17:902:e08d:: with SMTP id cb13-v6mr1067326plb.196.1542249258160; Wed, 14 Nov 2018 18:34:18 -0800 (PST) Received: from mba13.psav.com ([64.114.255.97]) by smtp.gmail.com with ESMTPSA id v185-v6sm27323393pfv.48.2018.11.14.18.34.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 18:34:17 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 14 Nov 2018 18:33:47 -0800 Message-Id: <20181115023353.20159-15-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181115023353.20159-1-ard.biesheuvel@linaro.org> References: <20181115023353.20159-1-ard.biesheuvel@linaro.org> Subject: [edk2] [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: , Cc: kamil.kacperski@intel.com, eric.jin@intel.com, pawel.orlowski@intel.com, michael.d.kinney@intel.com, harry.l.hsiung@intel.com MIME-Version: 1.0 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/XGigUndiDxe/ixgbe_type.h | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Ryszard Knop 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)