SPEC-2513 Fixes to enable w4324 (#1197)

* Fix warning 4324

* warning that doesnt trigger anything

* missed warning
This commit is contained in:
Esteban Papp
2021-06-09 11:33:13 -07:00
committed by GitHub
parent 5bdf9e3c6d
commit 68ffdd6714
9 changed files with 31 additions and 18 deletions
+4 -1
View File
@@ -140,7 +140,10 @@ typedef uint8 byte;
#define STDMETHODCALLTYPE
#endif
#define _ALIGN(num) __attribute__ ((aligned(num)))
#define _ALIGN(num) \
__attribute__ ((aligned(num))) \
AZ_POP_DISABLE_WARNING
#define _PACK __attribute__ ((packed))
// Safe memory freeing
+4 -1
View File
@@ -104,7 +104,10 @@ typedef float FLOAT;
#define STDMETHODCALLTYPE
#endif
#define _ALIGN(num) __attribute__ ((aligned(num)))
#define _ALIGN(num) \
__attribute__ ((aligned(num))) \
AZ_POP_DISABLE_WARNING
#define _PACK __attribute__ ((packed))
// Safe memory freeing
+3 -1
View File
@@ -111,7 +111,9 @@ int64 CryGetTicksPerSec();
}
#endif
#define _MS_ALIGN(num) __declspec(align(num))
#define _MS_ALIGN(num) \
AZ_PUSH_DISABLE_WARNING(4324, "-Wunknown-warning-option") \
__declspec(align(num))
#define DEFINE_ALIGNED_DATA(type, name, alignment) _declspec(align(alignment)) type name;
#define DEFINE_ALIGNED_DATA_STATIC(type, name, alignment) static _declspec(align(alignment)) type name;
+3 -1
View File
@@ -93,7 +93,9 @@ int64 CryGetTicksPerSec();
}
#endif
#define _MS_ALIGN(num) __declspec(align(num))
#define _MS_ALIGN(num) \
AZ_PUSH_DISABLE_WARNING(4324, "-Wunknown-warning-option") \
__declspec(align(num))
#define DEFINE_ALIGNED_DATA(type, name, alignment) _declspec(align(alignment)) type name;
#define DEFINE_ALIGNED_DATA_STATIC(type, name, alignment) static _declspec(align(alignment)) type name;
+2 -2
View File
@@ -733,12 +733,12 @@ enum ETriState
// Fallback for Alignment macro of GCC/CLANG (must be after the class definition)
#if !defined(_ALIGN)
#define _ALIGN(num)
#define _ALIGN(num) AZ_POP_DISABLE_WARNING
#endif
// Fallback for Alignment macro of MSVC (must be before the class definition)
#if !defined(_MS_ALIGN)
#define _MS_ALIGN(num)
#define _MS_ALIGN(num) AZ_PUSH_DISABLE_WARNING(4324, "-Wunknown-warning-option")
#endif
#if defined(WIN32) || defined(WIN64)