]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: fix gcc12 warning
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 24 Mar 2022 12:04:35 +0000 (20:04 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 28 Mar 2022 00:51:30 +0000 (00:51 +0000)
commit85021f8cf22d1bd4114803c6c610dea5ef0059f1
treeed2fba8d329f25fa08bc7b2d75c84b108271b5a1
parent7b005f344e533cd913c3ca05b266f9872df886d1
BaseTools: fix gcc12 warning

Sdk/C/LzmaEnc.c: In function ?LzmaEnc_CodeOneMemBlock?:
Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable ?outStream? in ?*p.rc.outStream? [-Werror=dangling-pointer=]
 2828 |   p->rc.outStream = &outStream.vt;
      |   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
Sdk/C/LzmaEnc.c:2811:28: note: ?outStream? declared here
 2811 |   CLzmaEnc_SeqOutStreamBuf outStream;
      |                            ^~~~~~~~~
Sdk/C/LzmaEnc.c:2811:28: note: ?pp? declared here
Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable ?outStream? in ?*(CLzmaEnc *)pp.rc.outStream? [-Werror=dangling-pointer=]
 2828 |   p->rc.outStream = &outStream.vt;
      |   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
Sdk/C/LzmaEnc.c:2811:28: note: ?outStream? declared here
 2811 |   CLzmaEnc_SeqOutStreamBuf outStream;
      |                            ^~~~~~~~~
Sdk/C/LzmaEnc.c:2811:28: note: ?pp? declared here
cc1: all warnings being treated as errors

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c