aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/intel/fsp1_0/baytrail/include/fsphob.h
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2016-05-05 20:21:47 -0700
committerMartin Roth <martinroth@google.com>2016-05-13 17:34:13 +0200
commit0b4db1399462dc8febb6d5c798b68c257f9055b1 (patch)
treef6c303ce9f8017c9f6e4dca3a7c11011332c3955 /src/vendorcode/intel/fsp1_0/baytrail/include/fsphob.h
parent1eaf58be2c2cc16f2fec7cfd0a58da4402647f70 (diff)
vendorcode/intel/fsp1_0: Don't break GCC strict aliasing
Change-Id: I6b345670db7df652b8b712b721dfe2905373e0d5 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/14630 Tested-by: build bot (Jenkins) Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com> Reviewed-by: York Yang <york.yang@intel.com>
Diffstat (limited to 'src/vendorcode/intel/fsp1_0/baytrail/include/fsphob.h')
-rw-r--r--src/vendorcode/intel/fsp1_0/baytrail/include/fsphob.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vendorcode/intel/fsp1_0/baytrail/include/fsphob.h b/src/vendorcode/intel/fsp1_0/baytrail/include/fsphob.h
index 7edef0d69e..04e2123b9b 100644
--- a/src/vendorcode/intel/fsp1_0/baytrail/include/fsphob.h
+++ b/src/vendorcode/intel/fsp1_0/baytrail/include/fsphob.h
@@ -313,7 +313,7 @@ typedef union {
**/
#define GET_HOB_TYPE(HobStart) \
- ((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobType)
+ (((EFI_HOB_GENERIC_HEADER *)(HobStart))->HobType)
/**
Returns the length, in bytes, of a HOB.
@@ -327,7 +327,7 @@ typedef union {
**/
#define GET_HOB_LENGTH(HobStart) \
- ((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobLength)
+ (((EFI_HOB_GENERIC_HEADER *)(HobStart))->HobLength)
/**
Returns a pointer to the next HOB in the HOB list.
@@ -341,7 +341,7 @@ typedef union {
**/
#define GET_NEXT_HOB(HobStart) \
- (VOID *)(*(UINT8 **)&(HobStart) + GET_HOB_LENGTH (HobStart))
+ (VOID *)((UINT8 *)(HobStart) + GET_HOB_LENGTH(HobStart))
/**
Determines if a HOB is the last HOB in the HOB list.
@@ -356,7 +356,7 @@ typedef union {
@retval FALSE The HOB specified by HobStart is not the last HOB in the HOB list.
**/
-#define END_OF_HOB_LIST(HobStart) (GET_HOB_TYPE (HobStart) == (UINT16)EFI_HOB_TYPE_END_OF_HOB_LIST)
+#define END_OF_HOB_LIST(HobStart) (GET_HOB_TYPE(HobStart) == (UINT16)EFI_HOB_TYPE_END_OF_HOB_LIST)
/**
Returns a pointer to data buffer from a HOB of type EFI_HOB_TYPE_GUID_EXTENSION.
@@ -370,7 +370,7 @@ typedef union {
**/
#define GET_GUID_HOB_DATA(HobStart) \
- (VOID *)(*(UINT8 **)&(HobStart) + sizeof (EFI_HOB_GUID_TYPE))
+ (VOID *)((UINT8 *)(HobStart) + sizeof(EFI_HOB_GUID_TYPE))
/**
Returns the size of the data buffer from a HOB of type EFI_HOB_TYPE_GUID_EXTENSION.
@@ -383,7 +383,7 @@ typedef union {
@return The size of the data buffer.
**/
#define GET_GUID_HOB_DATA_SIZE(HobStart) \
- (UINT16)(GET_HOB_LENGTH (HobStart) - sizeof (EFI_HOB_GUID_TYPE))
+ (UINT16)(GET_HOB_LENGTH(HobStart) - sizeof(EFI_HOB_GUID_TYPE))
/**
Returns the pointer to the HOB list.