From nobody Wed May 15 22:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87983+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87983+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1648123485; cv=none; d=zohomail.com; s=zohoarc; b=WowbluN/kOBrXxT6aLGEqf76gICGMUuMhjjBnWPq+Yi26IL15lV2HW5lXgFt257LmyZIexU5F9WD7T3iwxTkGoYTkzZhvIW/xDdDuAO5mzEKQd3hgNz5a23G7kaFA1mpRM2qoBh4jRia5jYkTd4CDChTkQty+u+qGaT/jwShNho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648123485; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Zj7+eHlxBFe5F7QeyE7vL05GriwHYKeJYLiSCSjSzpI=; b=Vk+OrWgIXtlfjHWN63OqlKukKh177JoUGBECmt7It7TmN6p6a//gKKQz6RIkUn7aSjhPy39Qti0c786qkExHB8/nIHcbrI8unxvZn0hbhkBDatJWqHpsHS63Vr1WyY3hvbYNm96u2D4LucjOaGL5w2xcp+794kXlvqF9zucyR1U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87983+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16481234856921010.7971584119105; Thu, 24 Mar 2022 05:04:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fMGaYY1788612xfa5LuMqLEp; Thu, 24 Mar 2022 05:04:45 -0700 X-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.web09.9783.1648123484037938204 for ; Thu, 24 Mar 2022 05:04:44 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-564-rat00wuJOtGIdLEekxgWMw-1; Thu, 24 Mar 2022 08:04:39 -0400 X-MC-Unique: rat00wuJOtGIdLEekxgWMw-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 748F43C163E1; Thu, 24 Mar 2022 12:04:39 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.196.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3606C698CF0; Thu, 24 Mar 2022 12:04:39 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 511121800614; Thu, 24 Mar 2022 13:04:36 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Liming Gao , Yuwei Chen , Oliver Steffen , Bob Feng , Gerd Hoffmann Subject: [edk2-devel] [PATCH 1/3] BaseTools: fix gcc12 warning Date: Thu, 24 Mar 2022 13:04:34 +0100 Message-Id: <20220324120436.939688-2-kraxel@redhat.com> In-Reply-To: <20220324120436.939688-1-kraxel@redhat.com> References: <20220324120436.939688-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: O9oT1zIku0uI0MVVKi80WR4Cx1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1648123485; bh=3AH1UZEQcV0WdbGFZoddbQGdfzCg4YCPJDpjSrjd5D4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=ib+Z3bA0FOtDS/lF3QDW6aM6eyobiUCQYdwqqHtGyUSkvPWG1nT5Pyej7uanUsKYYnz Rr6XQLI9N83URi6seE+POE0Hp1j2im/FVLba9oEFB3ZtLDCejC5wl13XeBSeqSgD/IRPL MfNrBnvcNssXCzr4ydCOCSHtWbBZouk6jOs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1648123486940100001 GenFfs.c:545:5: error: pointer =E2=80=98InFileHandle=E2=80=99 used after = =E2=80=98fclose=E2=80=99 [-Werror=3Duse-after-free] 545 | Error(NULL, 0, 4001, "Resource", "memory cannot be allocated o= f %s", InFileHandle); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~ GenFfs.c:544:5: note: call to =E2=80=98fclose=E2=80=99 here 544 | fclose (InFileHandle); | ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Gerd Hoffmann Reviewed-by: Bob Feng --- BaseTools/Source/C/GenFfs/GenFfs.c | 2 +- BaseTools/Source/C/GenSec/GenSec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs= /GenFfs.c index 949025c33325..d78d62ab3689 100644 --- a/BaseTools/Source/C/GenFfs/GenFfs.c +++ b/BaseTools/Source/C/GenFfs/GenFfs.c @@ -542,7 +542,7 @@ GetAlignmentFromFile(char *InFile, UINT32 *Alignment) PeFileBuffer =3D (UINT8 *) malloc (PeFileSize); if (PeFileBuffer =3D=3D NULL) { fclose (InFileHandle); - Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", = InFileHandle); + Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", = InFile); return EFI_OUT_OF_RESOURCES; } fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec= /GenSec.c index d54a4f9e0a7d..b1d05367ec0b 100644 --- a/BaseTools/Source/C/GenSec/GenSec.c +++ b/BaseTools/Source/C/GenSec/GenSec.c @@ -1062,7 +1062,7 @@ GetAlignmentFromFile(char *InFile, UINT32 *Alignment) PeFileBuffer =3D (UINT8 *) malloc (PeFileSize); if (PeFileBuffer =3D=3D NULL) { fclose (InFileHandle); - Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", = InFileHandle); + Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", = InFile); return EFI_OUT_OF_RESOURCES; } fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); --=20 2.35.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87983): https://edk2.groups.io/g/devel/message/87983 Mute This Topic: https://groups.io/mt/89997410/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 15 22:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87984+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87984+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1648123487; cv=none; d=zohomail.com; s=zohoarc; b=fS0Uuuv3B8r/Zxn0TUMSrPeFrEl9oACIKNiNqb+0MVhC1pmpTSBBVEO9a6Uk6EQwt+VfLqLuQizKF20qYeDVYPdJd84iZUK9xkjpK9mufKhFXKuWQ0ClxQ3JJrDSwjKSmxvzpGlpKapUSfJ/vTXJwyRZHlbBUtBfpXhTEGMh4YA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648123487; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=kezmKYndTmP2ksR8+FKccoPQZbhzOtZUn3UZftAT1pI=; b=G/HxKx4OVU6JlW05MwVfhnhKKA1uqHNRNcFrkl4Cb2TyKIneGYACDGOcsDbfwyxVCsNa1u34ijXQYEqCDw6oPeF5XjPkSQFF81AusQaL27PRHNgz5Pf22VJOws/Tae6mPJ2JmGzHHdFSmTJmjSEgsUjk0JNRkswSC71CGy22PFA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87984+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1648123487043532.6965026898071; Thu, 24 Mar 2022 05:04:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7g1qYY1788612xQQEPA8V9S1; Thu, 24 Mar 2022 05:04:46 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.9906.1648123485990883808 for ; Thu, 24 Mar 2022 05:04:46 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-Nv1heSrrOdCUixCj4Y3oCA-1; Thu, 24 Mar 2022 08:04:41 -0400 X-MC-Unique: Nv1heSrrOdCUixCj4Y3oCA-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F51629ABA28; Thu, 24 Mar 2022 12:04:41 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.196.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CDA3C27E93; Thu, 24 Mar 2022 12:04:41 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 56AE51800617; Thu, 24 Mar 2022 13:04:36 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Liming Gao , Yuwei Chen , Oliver Steffen , Bob Feng , Gerd Hoffmann Subject: [edk2-devel] [PATCH 2/3] BaseTools: fix gcc12 warning Date: Thu, 24 Mar 2022 13:04:35 +0100 Message-Id: <20220324120436.939688-3-kraxel@redhat.com> In-Reply-To: <20220324120436.939688-1-kraxel@redhat.com> References: <20220324120436.939688-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: dZnUPcHYe4SP16z6ffE7YEpCx1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1648123486; bh=y0W8XZ0xCx/2MJLkPnbjak0SnLLcAOD+upvKSGt+8Hw=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=oeYOFtFEFRawr78csrq9xmSUTGVELNt/qoiNNTyf1au6Ne5RpExoJINdZ3I6qfGRLTS bTb4Fda8VUslZPzpksQuiDzOCrNhkFi8WbgRcI5xn1dx9Cp4AogEDPdmfVItqI0TTfuQh Jx9BCdx1gdGSgXijhsPiuGZLRZmgI1qrrlA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1648123488579100006 Sdk/C/LzmaEnc.c: In function =E2=80=98LzmaEnc_CodeOneMemBlock=E2=80=99: Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable =E2= =80=98outStream=E2=80=99 in =E2=80=98*p.rc.outStream=E2=80=99 [-Werror=3Dda= ngling-pointer=3D] 2828 | p->rc.outStream =3D &outStream.vt; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ Sdk/C/LzmaEnc.c:2811:28: note: =E2=80=98outStream=E2=80=99 declared here 2811 | CLzmaEnc_SeqOutStreamBuf outStream; | ^~~~~~~~~ Sdk/C/LzmaEnc.c:2811:28: note: =E2=80=98pp=E2=80=99 declared here Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable =E2= =80=98outStream=E2=80=99 in =E2=80=98*(CLzmaEnc *)pp.rc.outStream=E2=80=99 = [-Werror=3Ddangling-pointer=3D] 2828 | p->rc.outStream =3D &outStream.vt; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ Sdk/C/LzmaEnc.c:2811:28: note: =E2=80=98outStream=E2=80=99 declared here 2811 | CLzmaEnc_SeqOutStreamBuf outStream; | ^~~~~~~~~ Sdk/C/LzmaEnc.c:2811:28: note: =E2=80=98pp=E2=80=99 declared here cc1: all warnings being treated as errors Signed-off-by: Gerd Hoffmann Reviewed-by: Bob Feng --- BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/So= urce/C/LzmaCompress/Sdk/C/LzmaEnc.c index 4e9b499f8d80..4b9f5fa69248 100644 --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c @@ -2825,12 +2825,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Boo= lInt reInit, =20 nowPos64 =3D p->nowPos64; RangeEnc_Init(&p->rc); - p->rc.outStream =3D &outStream.vt; =20 if (desiredPackSize =3D=3D 0) return SZ_ERROR_OUTPUT_EOF; =20 + p->rc.outStream =3D &outStream.vt; res =3D LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); + p->rc.outStream =3D NULL; =20 *unpackSize =3D (UInt32)(p->nowPos64 - nowPos64); *destLen -=3D outStream.rem; --=20 2.35.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87984): https://edk2.groups.io/g/devel/message/87984 Mute This Topic: https://groups.io/mt/89997412/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Wed May 15 22:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87986+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87986+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1648123492; cv=none; d=zohomail.com; s=zohoarc; b=A1sCFGDxzV327kyg5+JN+ZcGuaplVLcpR830pVqA/cyX4yrTMsatoLEhSyr4MDRa3sX4Y8nRU13r55zrRMEXvEQsXmj7lSIxoUC8ynxL/VJx2V6j6x5BPhFJYlF3IDmxK6c/HZCmgJTmjSnMrvWCJXHJbklPiYirlyAJDRvBeko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648123492; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Qm8rjC+aeJfGYheVnK+ODmlVhN5hybGBiCIgXviyeIQ=; b=iGv1Rj9do6xci3dMeFLJX2+lgGHBkQ7y2Q9JLJaiKJ16JYmHBqCFa1thoHzCRfwfbD6o2+hovLiwE5OejDOt99yUrTu5fLmTfK/SKM3EKBgR888Q8KDz+Exew+/gxl8/5//tTzC3dZ15WTJpiKNI775xNAcCovGgV4jlaCJSiXs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87986+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1648123492521103.65382826836299; Thu, 24 Mar 2022 05:04:52 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id yRiZYY1788612xjNT69UQFbf; Thu, 24 Mar 2022 05:04:52 -0700 X-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.web11.9959.1648123491253231651 for ; Thu, 24 Mar 2022 05:04:51 -0700 X-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-88-0FCgn98oOyqZtumf1jS2nw-1; Thu, 24 Mar 2022 08:04:45 -0400 X-MC-Unique: 0FCgn98oOyqZtumf1jS2nw-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9434185A5A8; Thu, 24 Mar 2022 12:04:44 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.196.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B1BC9E62; Thu, 24 Mar 2022 12:04:44 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 59CBF180061B; Thu, 24 Mar 2022 13:04:36 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Liming Gao , Yuwei Chen , Oliver Steffen , Bob Feng , Gerd Hoffmann Subject: [edk2-devel] [PATCH 3/3] Basetools: turn off gcc12 warning Date: Thu, 24 Mar 2022 13:04:36 +0100 Message-Id: <20220324120436.939688-4-kraxel@redhat.com> In-Reply-To: <20220324120436.939688-1-kraxel@redhat.com> References: <20220324120436.939688-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: 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,kraxel@redhat.com X-Gm-Message-State: NGcQExaysZEXNEeTLoKlqUBHx1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1648123492; bh=GDtQV1IkorKvXPuQuiWam5kMtn6UvDnNxn6h/1Lsevg=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=pRVTxfN1Aaw8PoK1UYJtVofAcY3YBcfe6qrVBXeEbeiLxZkr+hGF3jdNXHXMLyZhLiM wR4nBLZGeTf9OxbawCfYwuckrGg3s+upklIsuznYsFaIdGs0bufLwJ/h68T/3amTkcV6c v2Hc3ueZQo5+8sAt2/sYgkaVeZXu24ojqHE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1648123494614100002 In function =E2=80=98SetDevicePathEndNode=E2=80=99, inlined from =E2=80=98FileDevicePath=E2=80=99 at DevicePathUtilities.c:= 857:5: DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1= [-Werror=3Dstringop-overflow=3D] 321 | memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevi= cePathLibEndDevicePath)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~~ In file included from UefiDevicePathLib.h:22, from DevicePathUtilities.c:16: ../Include/Protocol/DevicePath.h: In function =E2=80=98FileDevicePath=E2=80= =99: ../Include/Protocol/DevicePath.h:51:9: note: destination object =E2=80=98Ty= pe=E2=80=99 of size 1 51 | UINT8 Type; ///< 0x01 Hardware Device Path. | ^~~~ Signed-off-by: Gerd Hoffmann Reviewed-by: Bob Feng --- BaseTools/Source/C/DevicePath/GNUmakefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C= /DevicePath/GNUmakefile index 7ca08af9662d..b05d2bddfa68 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -13,6 +13,9 @@ OBJECTS =3D DevicePath.o UefiDevicePathLib.o DevicePathFr= omText.o DevicePathUtili =20 include $(MAKEROOT)/Makefiles/app.makefile =20 +# gcc 12 trips over device path handling +BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow + LIBS =3D -lCommon ifeq ($(CYGWIN), CYGWIN) LIBS +=3D -L/lib/e2fsprogs -luuid --=20 2.35.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87986): https://edk2.groups.io/g/devel/message/87986 Mute This Topic: https://groups.io/mt/89997416/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-