Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 92a1ac40809e0886ac5c53864993e268b515674c
      
https://github.com/tianocore/edk2/commit/92a1ac40809e0886ac5c53864993e268b515674c
  Author: Ard Biesheuvel <ard.biesheu...@linaro.org>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c

  Log Message:
  -----------
  OvmfPkg/X86QemuLoadImageLib: add dummy assignment to work around GCC

GCC 4.8 or 4.9 may throw the following error when building OVMF:

  Edk2/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c:
      In function ‘QemuLoadKernelImage’:
  Edk2/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c:416:30:
      error: ‘CommandLine’ may be used uninitialized in this function
                                               [-Werror=maybe-uninitialized]
        UnicodeSPrintAsciiFormat (
        cc1: all warnings being treated as errors

This is due to the fact that older GCCs fail to infer that CommandLine is
never actually used unless it has been assigned. So add a redundant NULL
assignment to help these older GCCs understand this.

Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2630
Fixes: 7c47d89003a6f ("OvmfPkg: implement QEMU loader library for X86 with ...")
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
Reviewed-by: Laszlo Ersek <ler...@redhat.com>


  Commit: f52b30e73ddee9a3a609a6e5aa87e79cf4f50879
      
https://github.com/tianocore/edk2/commit/f52b30e73ddee9a3a609a6e5aa87e79cf4f50879
  Author: Ard Biesheuvel <ard.biesheu...@linaro.org>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c

  Log Message:
  -----------
  ArmVirtPkg/PlatformPeiLib: add dummy assignment to work around older GCC

Older GCC (<= 4.9) fail to infer that Parent is never used unless it
has been assigned before, and may throw an error like

  /work/git/edk2/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c:
      In function ‘PlatformPeim’:
  /work/git/edk2/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c:132:24:
      error: ‘Parent’ may be used uninitialized in this function
                                                [-Werror=maybe-uninitialized]
             RangesProp = fdt_getprop (Base, Parent, "ranges", &RangesLen);

Set Parent to 0 at the start of the sequence to work around this.

Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2601
Fixes: 82662a3b5f56e974 ("ArmVirtPkg/PlatformPeiLib: discover the TPM base ...")
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
Reviewed-by: Laszlo Ersek <ler...@redhat.com>


Compare: https://github.com/tianocore/edk2/compare/e24529a5c324...f52b30e73dde


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

Reply via email to