From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.20047.1683731220260078367 for ; Wed, 10 May 2023 08:07:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NAMhQsUl; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7535063130 for ; Wed, 10 May 2023 15:06:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBB2CC433EF for ; Wed, 10 May 2023 15:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683731218; bh=+jKARF3FNFQ3QOyT3pBERDe+zdL3i60KK8SeFM+Avnw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NAMhQsUln0HBCWgniI8uZvigUTjtSH7ZqfDxp5++BAUCxrBrNNQL5iKGOBP0TAtMu GcHNlLiz9gukyKFRy3JO3Pbe5PROfCATctcoi+zy1jxdyLaYwr6TvJ+eAbEvsGpjcw XudjFJimk/ofZzLIQF4y9waxPOYy/aBRP7rDZPt5UN1nOeamHrNY0NBaXR3U7bYyDN dg5z/eOuULLWdkuRGU5HRfRuMzZywVRbPD/QqbR959FH1iPevow4pNreb//fVLLTMS Rm7b0YWE/AlkfoYy47nrR/B/5AMvSqbQIHcEksdCmhtBk/R+ckuVtOAdE+TR9s74Yn P9A/V55D9rfTg== Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2ac82b07eb3so74396911fa.1 for ; Wed, 10 May 2023 08:06:58 -0700 (PDT) X-Gm-Message-State: AC+VfDzprLJLd+rxozmiupydCeLttLoL2ekFbJOZemOUFQIAsPEKEsW4 CPxJ4IBYNo2C6FJHFqukskjQx8kEFnFy/LZFIe0= X-Google-Smtp-Source: ACHHUZ6C2IcP8iGEO2JLSlR3WEJT4EE0TvmBF9mzwhp42gvzgnYhW9gwVgQX8dThNGKlN0KZFVzH83HD/EVDgTLNIoU= X-Received: by 2002:a2e:9ed4:0:b0:2ad:999b:3bd7 with SMTP id h20-20020a2e9ed4000000b002ad999b3bd7mr2258983ljk.19.1683731216942; Wed, 10 May 2023 08:06:56 -0700 (PDT) MIME-Version: 1.0 References: <20230510073358.79042-1-kraxel@redhat.com> In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 10 May 2023 17:06:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VirtioSerialDxe: fix RELEASE build error To: devel@edk2.groups.io, kraxel@redhat.com Cc: Pawel Polawski , Ard Biesheuvel , Jordan Justen , Oliver Steffen , Jiewen Yao , Rebecca Cran Content-Type: text/plain; charset="UTF-8" On Wed, 10 May 2023 at 15:54, Ard Biesheuvel wrote: > > On Wed, 10 May 2023 at 11:18, Ard Biesheuvel wrote: > > > > On Wed, 10 May 2023 at 09:39, Ard Biesheuvel wrote: > > > > > > On Wed, 10 May 2023 at 09:34, Gerd Hoffmann wrote: > > > > > > > > EventNames is used to pretty-print debug log messages. > > > > Add #ifdef to only include it in debug builds. > > > > Fixes a clang build failure. > > > > > > > > Reported-by: Rebecca Cran > > > > Signed-off-by: Gerd Hoffmann > > > > > > Queued up as #4381 - thanks. > > > > > > > This appears to break the build > > > > https://github.com/tianocore/edk2/pull/4381 > > Actually, looking at the code, I think the Clang diagnostic is highly > dubious here. The non-DEBUG code takes the ARRAY_SIZE() of EventNames, > and so the #ifdef will result in a compiler error. > > I suppose we can work around this, but we might also just add > -Wunneeded-internal-declaration to the clang cflags for RELEASE I've sent a BaseTools patch for this - I suggest we merge that and drop this one.