]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/c.py
BaseTools/ECC: Add a new exception support
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / c.py
index 35b7405e550d3b221b652e5fffd700be9e029f43..39a9d8ac363a8abeb1cbe060010ad0c98b6a633c 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to be the c coding style checking of ECC tool\r
 #\r
 ## @file\r
 # This file is used to be the c coding style checking of ECC tool\r
 #\r
-# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -1858,7 +1858,13 @@ def CheckDeclNoUseCType(FullFileName):
     for Result in ResultSet:\r
         for Type in CTypeTuple:\r
             if PatternInModifier(Result[0], Type):\r
     for Result in ResultSet:\r
         for Type in CTypeTuple:\r
             if PatternInModifier(Result[0], Type):\r
-                PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, 'Variable type %s' % Type, FileTable, Result[2])\r
+                if EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE,\r
+                                                        Result[0] + ' ' + Result[1]):\r
+                    continue\r
+                PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE,\r
+                              'Invalid variable type (%s) in definition [%s]' % (Type, Result[0] + ' ' + Result[1]),\r
+                              FileTable,\r
+                              Result[2])\r
                 break\r
 \r
     SqlStatement = """ select Modifier, Name, ID, Value\r
                 break\r
 \r
     SqlStatement = """ select Modifier, Name, ID, Value\r