mirror_edk2/BaseTools/Source/C
Leif Lindholm 978779d7b5 BaseTools: align ERROR/WARNING/RETURN macros with MdePkg versions
BaseTools' BaseTypes.h defined the ENCODE_ERROR macro as
 #define ENCODE_ERROR(a)              ((RETURN_STATUS)(MAX_BIT | (a)))
whereas MdePkg defines it as
 #define ENCODE_ERROR(StatusCode)     ((RETURN_STATUS)(MAX_BIT | (StatusCode)))

When building with GCC 6.3 (at least) the former triggers
"error: overflow in implicit constant conversion [-Werror=overflow]"
Resolve this by aligning it with the latter one.

This also requires aligning the BaseTools typedef of RETURN_STATUS with
the MdePkg one: INTN -> UINTN.

While at it, update adjacent ENCODE_WARNING and RETURN_ERROR as well.

Add an explicit initialization of *Alignment to 0 in GenFfs.c
GetAlignmentFromFile to get rid of a warning occuring with GCC after
this change (-Werror=maybe-uninitialized).

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-12-08 09:54:05 +00:00
..
BootSectImage BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
BrotliCompress BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
Common BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
EfiLdrImage BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
EfiRom BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
GenBootSector BaseTools/GenBootSector: Fix file handles not being closed 2016-11-08 16:37:57 +08:00
GenCrc32 BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
GenFfs BaseTools: align ERROR/WARNING/RETURN macros with MdePkg versions 2017-12-08 09:54:05 +00:00
GenFv BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
GenFw BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
GenPage BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
GenSec BaseTools: Fix GenSec GCC make failure 2017-12-06 09:46:41 +08:00
GenVtf BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
GnuGenBootSector BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
Include BaseTools: align ERROR/WARNING/RETURN macros with MdePkg versions 2017-12-08 09:54:05 +00:00
LzmaCompress BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
Makefiles BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
PyEfiCompressor License header updated to match correct format. 2014-08-28 13:53:34 +00:00
PyUtility License header updated to match correct format. 2014-08-28 13:53:34 +00:00
Split BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
TianoCompress BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
VfrCompile BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
VolInfo BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00
GNUmakefile BaseTools: Update C tools top GNUMakefile to adjust tool order 2017-11-30 13:06:52 +08:00
Makefile BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict 2017-11-30 13:06:44 +08:00