From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AJdET5dhx1uAy4kJBuW9xk2daxbf/t3aD4VOBe++j7yXGZRMcfZ+mDkFZeto3Mc9oHoFkOy9JmCLWA== 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 Cc: leif.lindholm@linaro.org, maciej.rabeda@intel.com, kamil.kacperski@intel.com, pawel.orlowski@intel.com, philmd@redhat.com, michael.d.kinney@intel.com, harry.l.hsiung@intel.com, eric.jin@intel.com, Ard Biesheuvel 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: [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: Thu, 15 Nov 2018 02:34:18 -0000 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) -- 2.17.1