Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 3dbf922901c0fea2c6dc1c3fe9fa1911af889fbf
      
https://github.com/tianocore/edk2/commit/3dbf922901c0fea2c6dc1c3fe9fa1911af889fbf
  Author: Laszlo Ersek <ler...@redhat.com>
  Date:   2018-02-08 (Thu, 08 Feb 2018)

  Changed paths:
    M ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.c
    M ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.h

  Log Message:
  -----------
  ShellPkg/UefiShellDebug1CommandsLib: sync Compress() definition with decl.

"Compress.h" declares the Compress() function as EFIAPI, but the
definition in "Compress.c" lacks EFIAPI.

GCC toolchains without LTO do not catch this error because "Compress.c"
does not include "Compress.h"; i.e. the declaration used by callers such
as "EfiCompress.c" is not actually matched against the function definition
at build time.

With LTO enabled, the mismatch is found -- however, as a warning only, due
to commit f8d0b9662993 ("BaseTools GCC5: disable warnings-as-errors for
now", 2016-08-03).

Include the header in the C file (which turns the issue into a hard build
error on all GCC toolchains), plus sync the declaration from the header
file to the C file. Finally, remove EFIAPI from both declaration and
definition -- this was the original intent of commit c4e74e9b814c
("ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI",
2016-10-09), but it missed the header file.

(Gary meant to address that omission in Oct 2017:

  [edk2] [PATCH] ShellPkg/UefiShellDebug1CommandsLib: Remove EFIAPI from
           Compress()

  http://mid.mail-archive.com/20171026065329.32311-1-glin@suse.com

and Ray reviewed the patch, but then the patch was never committed.)

So do the sync and drop EFIAPI now.

This happens to fix the EFICOMPRESS shell command, when built with GCC for
X64.

Cc: Gary Lin <g...@suse.com>
Cc: Jaben Carsey <jaben.car...@intel.com>
Cc: Ruiyu Ni <ruiyu...@intel.com>
Fixes: c4e74e9b814cfb4b51cf832f3bb218cd2aba348b
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
Reviewed-by: Gary Lin <g...@suse.com>
Reviewed-by: Jaben Carsey <jaben.car...@intel.com>


  Commit: c0d221a348543a4b296a64239826090a167b16ed
      
https://github.com/tianocore/edk2/commit/c0d221a348543a4b296a64239826090a167b16ed
  Author: Laszlo Ersek <ler...@redhat.com>
  Date:   2018-02-08 (Thu, 08 Feb 2018)

  Changed paths:
    M OvmfPkg/PlatformPei/AmdSev.c

  Log Message:
  -----------
  OvmfPkg/PlatformPei: sync AmdSevInitialize() definition with declaration

"Platform.h" declares the AmdSevInitialize() function without EFIAPI, but
the definition in "AmdSev.c" includes EFIAPI.

GCC toolchains without LTO do not catch this error because "AmdSev.c" does
not include "Platform.h"; i.e. the declaration used by callers such as
"Platform.c" is not actually matched against the function definition at
build time.

With LTO enabled, the mismatch is found -- however, as a warning only, due
to commit f8d0b9662993 ("BaseTools GCC5: disable warnings-as-errors for
now", 2016-08-03).

Include the header in the C file (which turns the issue into a hard build
error on all GCC toolchains), plus sync the declaration from the header
file to the C file.

There's been no functional breakage because AmdSevInitialize() takes no
parameters.

Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Cc: Brijesh Singh <brijesh.si...@amd.com>
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Fixes: 13b5d743c87a22dfcd94e8475d943dee5712b62d
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
Reviewed-by: Brijesh Singh <brijesh.si...@amd.com>
Reviewed-by: Jaben Carsey <jaben.car...@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org>


Compare: https://github.com/tianocore/edk2/compare/de8373fa07f8...c0d221a34854
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to