From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.51946.1683780920091481140 for ; Wed, 10 May 2023 21:55:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YOf8qzQx; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683780919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ONUW0GSvqGj1ajiKUIw+5+Spe07mzZvPWOTdnzTxWtM=; b=YOf8qzQxxPoUOlAvWnW5wfVJSoHmL2AP3/vLXV5+1eRNoy406qLuYO/ZQbXALnBIiZkQ7F wgTpacbCSbAMhxBBIQ4sgUnkuUxsKw6iPG5WwPNKOVuEzQP7ZlweZvpP+taxlO20dsb3Ms Of8A+SRlSnjLNhkPCx/JeDiFp6kxhhs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-294-Z3DxzuCCOnCbLIfETMn-1w-1; Thu, 11 May 2023 00:55:16 -0400 X-MC-Unique: Z3DxzuCCOnCbLIfETMn-1w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0F5D85A5A3; Thu, 11 May 2023 04:55:15 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7DC1F1410DD5; Thu, 11 May 2023 04:55:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 89E921801258; Thu, 11 May 2023 06:55:11 +0200 (CEST) Date: Thu, 11 May 2023 06:55:11 +0200 From: "Gerd Hoffmann" To: Ard Biesheuvel Cc: devel@edk2.groups.io, Rebecca Cran , Liming Gao Subject: Re: [PATCH] BaseTools/tools_def: Disable overzealous unused variable warning on Clang Message-ID: References: <20230510145008.1893553-1-ardb@kernel.org> MIME-Version: 1.0 In-Reply-To: <20230510145008.1893553-1-ardb@kernel.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 10, 2023 at 04:50:08PM +0200, Ard Biesheuvel wrote: > The warnings Clang emits when enabling -Wunneeded-internal-declaration > (which is part of -Wall) are generating false positives for variables > whose size gets taken but are not referenced beyond that. > > This may happen legitimately in debug code, so let's disable this > warning for Clang, rather than tiptoe around it in the code base. > > This fixes the RELEASE build for OVMF, which triggers this issue in the > newly added VirtioSerialDxe driver. > > Cc: Rebecca Cran > Cc: Gerd Hoffmann > Cc: Liming Gao > Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann