Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 7b005f344e533cd913c3ca05b266f9872df886d1
      
https://github.com/tianocore/edk2/commit/7b005f344e533cd913c3ca05b266f9872df886d1
  Author: Gerd Hoffmann <kra...@redhat.com>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M BaseTools/Source/C/GenFfs/GenFfs.c
    M BaseTools/Source/C/GenSec/GenSec.c

  Log Message:
  -----------
  BaseTools: fix gcc12 warning

GenFfs.c:545:5: error: pointer ?InFileHandle? used after ?fclose? 
[-Werror=use-after-free]
  545 |     Error(NULL, 0, 4001, "Resource", "memory cannot be allocated  of 
%s", InFileHandle);
      |     
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GenFfs.c:544:5: note: call to ?fclose? here
  544 |     fclose (InFileHandle);
      |     ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Bob Feng <bob.c.f...@intel.com>


  Commit: 85021f8cf22d1bd4114803c6c610dea5ef0059f1
      
https://github.com/tianocore/edk2/commit/85021f8cf22d1bd4114803c6c610dea5ef0059f1
  Author: Gerd Hoffmann <kra...@redhat.com>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c

  Log Message:
  -----------
  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 <kra...@redhat.com>
Reviewed-by: Bob Feng <bob.c.f...@intel.com>


  Commit: 22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c
      
https://github.com/tianocore/edk2/commit/22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c
  Author: Gerd Hoffmann <kra...@redhat.com>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M BaseTools/Source/C/DevicePath/GNUmakefile

  Log Message:
  -----------
  Basetools: turn off gcc12 warning

In function ?SetDevicePathEndNode?,
    inlined from ?FileDevicePath? at DevicePathUtilities.c:857:5:
DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1 
[-Werror=stringop-overflow=]
  321 |   memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof 
(mUefiDevicePathLibEndDevicePath));
      |   
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from UefiDevicePathLib.h:22,
                 from DevicePathUtilities.c:16:
../Include/Protocol/DevicePath.h: In function ?FileDevicePath?:
../Include/Protocol/DevicePath.h:51:9: note: destination object ?Type? of size 1
   51 |   UINT8 Type;       ///< 0x01 Hardware Device Path.
      |         ^~~~

Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Bob Feng <bob.c.f...@intel.com>


Compare: https://github.com/tianocore/edk2/compare/355515a06a60...22130dcd98b4


_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to