]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Disable some Level 4 warnings for VS2017/ARM64
authorPete Batard <pete@akeo.ie>
Fri, 23 Feb 2018 09:50:00 +0000 (17:50 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 19 Mar 2018 09:05:34 +0000 (17:05 +0800)
We disable the exact same warnings as IA32 and X64.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/AArch64/ProcessorBind.h

index bc473562f9e5b4b2d49331a98256c6676e55111b..968c18f915ae2762a5a645e39a3246fbb1513a1b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Processor or Compiler specific defines and types for AArch64.\r
 \r
 /** @file\r
   Processor or Compiler specific defines and types for AArch64.\r
 \r
-  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
   Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
 \r
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
   Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
 \r
 #pragma pack()\r
 #endif\r
 \r
 #pragma pack()\r
 #endif\r
 \r
-#if _MSC_EXTENSIONS\r
+#if defined(_MSC_EXTENSIONS)\r
+\r
+//\r
+// Disable some level 4 compilation warnings (same as IA32 and X64)\r
+//\r
+\r
+//\r
+// Disabling bitfield type checking warnings.\r
+//\r
+#pragma warning ( disable : 4214 )\r
+\r
+//\r
+// Disabling the unreferenced formal parameter warnings.\r
+//\r
+#pragma warning ( disable : 4100 )\r
+\r
+//\r
+// Disable slightly different base types warning as CHAR8 * can not be set\r
+// to a constant string.\r
+//\r
+#pragma warning ( disable : 4057 )\r
+\r
+//\r
+// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning\r
+//\r
+#pragma warning ( disable : 4127 )\r
+\r
+//\r
+// This warning is caused by functions defined but not used. For precompiled header only.\r
+//\r
+#pragma warning ( disable : 4505 )\r
+\r
+//\r
+// This warning is caused by empty (after preprocessing) source file. For precompiled header only.\r
+//\r
+#pragma warning ( disable : 4206 )\r
+\r
+//\r
+// Disable 'potentially uninitialized local variable X used' warnings\r
+//\r
+#pragma warning ( disable : 4701 )\r
+\r
+//\r
+// Disable 'potentially uninitialized local pointer variable X used' warnings\r
+//\r
+#pragma warning ( disable : 4703 )\r
+\r
   //\r
   // use Microsoft* C compiler dependent integer width types\r
   //\r
   //\r
   // use Microsoft* C compiler dependent integer width types\r
   //\r
@@ -45,7 +91,9 @@
   typedef unsigned char       UINT8;\r
   typedef char                CHAR8;\r
   typedef signed char         INT8;\r
   typedef unsigned char       UINT8;\r
   typedef char                CHAR8;\r
   typedef signed char         INT8;\r
+\r
 #else\r
 #else\r
+\r
   //\r
   // Assume standard AARCH64 alignment.\r
   //\r
   //\r
   // Assume standard AARCH64 alignment.\r
   //\r
   typedef unsigned char       UINT8;\r
   typedef char                CHAR8;\r
   typedef signed char         INT8;\r
   typedef unsigned char       UINT8;\r
   typedef char                CHAR8;\r
   typedef signed char         INT8;\r
+\r
 #endif\r
 \r
 ///\r
 #endif\r
 \r
 ///\r