mirror_edk2/ShellPkg/Library/UefiShellDebug1CommandsLib
Laszlo Ersek 3dbf922901 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 f8d0b96629 ("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 c4e74e9b81
("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 <glin@suse.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Fixes: c4e74e9b81
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Gary Lin <glin@suse.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2018-02-08 18:21:11 +01:00
..
Edit ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
HexEdit ShellPkg/HexEdit: Fix EBC build failure 2017-11-07 10:17:28 +08:00
SmbiosView ShellPkg: Update header file including style 2017-08-16 16:55:27 +08:00
Comp.c ShellPkg/comp: Fix file tag name. 2017-04-20 10:44:13 +08:00
Compress.c ShellPkg/UefiShellDebug1CommandsLib: sync Compress() definition with decl. 2018-02-08 18:21:11 +01:00
Compress.h ShellPkg/UefiShellDebug1CommandsLib: sync Compress() definition with decl. 2018-02-08 18:21:11 +01:00
Dblk.c ShellPkg/dblk: Honor the BlockIo alignment requirement. 2017-08-03 12:16:33 +08:00
Dmem.c ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
DmpStore.c ShellPkg/DmpStore: fix GCC/CLANG build failure 2017-09-22 16:50:44 +02:00
EditInputBar.c ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
EditInputBar.h ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
EditMenuBar.c ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
EditMenuBar.h ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
EditStatusBar.c ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
EditStatusBar.h ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
EditTitleBar.c ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
EditTitleBar.h ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
EfiCompress.c ShellPkg/EfiCompress: Handle memory allocation failure 2016-07-18 10:55:26 +08:00
EfiDecompress.c ShellPkg: Fix VS2010/2012 build failure 2016-07-19 11:12:22 +08:00
LoadPciRom.c ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
MemMap.c ShellPkg/memmap: Dump memory map information for all memory types 2017-05-12 10:50:51 +08:00
Mm.c ShellPkg/mm: Support UINT16 segment number 2017-03-27 14:10:59 +08:00
Mode.c ShellPkg: Standardized HP Copyright Message String 2015-02-04 22:25:01 +00:00
Pci.c ShellPkg/pci: Fix VS2012 build failure 2017-04-20 11:04:50 +08:00
Pci.h ShellPkg/pci: Use PCI definitions defined in MdePkg 2017-01-25 16:09:05 +08:00
SerMode.c ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:47 +08:00
SetSize.c ShellPkg: Standardized HP Copyright Message String 2015-02-04 22:25:01 +00:00
SetVar.c ShellPkg/setvar: Check the duplicate flag 2017-07-27 18:07:55 +08:00
UefiShellDebug1CommandsLib.c Shellpkg/editor: Fix a bug that may modifies Line[-1] 2017-10-26 13:04:15 +08:00
UefiShellDebug1CommandsLib.h ShellPkg/Debug1CommandLib: Use StrToGuid/StrHexToBytes in BaseLib 2017-03-01 13:39:46 +08:00
UefiShellDebug1CommandsLib.inf ShellPkg: Update Guid/Protocol usages in INF files. 2016-04-13 14:52:59 +08:00
UefiShellDebug1CommandsLib.uni ShellPkg/dmpstore: Show name of known variable vendor GUID 2017-09-22 10:32:23 +08:00