From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 25442D8026F for ; Sun, 10 Dec 2023 09:42:12 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=t0Jp1Mj6nnt9m8YHVOsUEgRCa3D7NGjHmiinuQIqlJI=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1702201331; v=1; b=ncDCViKXRcaZu8OaXzL7ALWhd97bAYOw/VZKrNcoOdxiCTpCwznBIypexgGZWJ+zBIQetqXw S+remGWq73KZRFkk+CZP+KSH+R0ojWrTsnfoTVIi9pj4XaEpsCrNFMQgp+59tpqhSCXQwcOk+nH PD0L069nStvXuBMmU9al/wo4= X-Received: by 127.0.0.2 with SMTP id 3VrwYY7687511x67oR6jWtnp; Sun, 10 Dec 2023 01:42:11 -0800 X-Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mx.groups.io with SMTP id smtpd.web10.51834.1702201330854403060 for ; Sun, 10 Dec 2023 01:42:11 -0800 X-Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-33334480eb4so4120378f8f.0 for ; Sun, 10 Dec 2023 01:42:10 -0800 (PST) X-Gm-Message-State: qIaSm9CuXId3HceMH5j2dAZMx7686176AA= X-Google-Smtp-Source: AGHT+IF9oak9/iREaBQYAq+tt/Ind8jrSZY5gyZ3ZVH+WcDHfavTHerPRWw9FiOJ2ui+s4z8yW3lfxA7jjBPdcL6OkE= X-Received: by 2002:a1c:7914:0:b0:40c:233f:e03b with SMTP id l20-20020a1c7914000000b0040c233fe03bmr1340672wme.32.1702201328960; Sun, 10 Dec 2023 01:42:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "Mike Beaton" Date: Sun, 10 Dec 2023 09:41:57 +0000 Message-ID: Subject: Re: [edk2-devel] RELEASE CLANGPDB OVMF currently does not compile To: Ard Biesheuvel Cc: devel@edk2.groups.io, Ard Biesheuvel Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mjsbeaton@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ncDCViKX; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) > Removing STATIC means that (modulo LTO) the compiler will not know > whether or not the definition can be dropped. It also pollutes the > global namespace. > > IMO, lack of the use of STATIC where appropriate is a severe issue > with the EDK2 codebase. Removing STATIC to appease compiler > diagnostics is *not* the way to solve this. Thank you for your feedback. On reflection, since gcc still _can_ distinguish between genuinely unused variables and variables who usage was optimized away like this (I think that's well known; but I just double-checked by adding a similar, but entirely unused variable to the same file - gcc then complains), and since all code in the project is going to end up being compiled under gcc as well clang, then just squelching the (slightly broken) warning under clang is not really losing useful information after all, in this case. So thank you for the ack, and agreed, now, that it is the best way to proceed. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112258): https://edk2.groups.io/g/devel/message/112258 Mute This Topic: https://groups.io/mt/103083030/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-