diff options
| author | Leif Lindholm <leif.lindholm@linaro.org> | 2017-12-05 19:10:15 +0300 |
|---|---|---|
| committer | Leif Lindholm <leif.lindholm@linaro.org> | 2017-12-08 12:54:05 +0300 |
| commit | 978779d7b50cc30cad64b79e24224efa3c6082dc (patch) | |
| tree | 39bc8f65a38821a071f5eddcae8077e1556d0419 /BaseTools/Source/Python/CommonDataClass/PackageClass.py | |
| parent | 50255363cbf0555e0f09adfb327189bd7a4be9da (diff) | |
| download | edk2-978779d7b50cc30cad64b79e24224efa3c6082dc.tar.xz | |
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>
Diffstat (limited to 'BaseTools/Source/Python/CommonDataClass/PackageClass.py')
0 files changed, 0 insertions, 0 deletions
