Re: [edk2-devel] [PATCH v1 16/19] DynamicTablesPkg: Option for VS2017 static code analysis

2019-08-23 Thread Alexei Fedorov
Reviewed-by: Alexei Fedorov 


Alexei


From: Sami Mujawar 
Sent: 23 August 2019 11:55
To: devel@edk2.groups.io 
Cc: Sami Mujawar ; Alexei Fedorov 
; leif.lindh...@linaro.org ; 
Matteo Carlini ; nd 
Subject: [PATCH v1 16/19] DynamicTablesPkg: Option for VS2017 static code 
analysis

Add build option STATIC_ANALYSIS to enable VS2017 static
code analysis.

Signed-off-by: Sami Mujawar 
---
 DynamicTablesPkg/DynamicTablesPkg.dsc | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/DynamicTablesPkg/DynamicTablesPkg.dsc 
b/DynamicTablesPkg/DynamicTablesPkg.dsc
index 
dfe6c07111059cdd3eed23becf5000c04270bd9c..6ff6ff019e080f355ca24c9d05f71f8b85ab9077
 100644
--- a/DynamicTablesPkg/DynamicTablesPkg.dsc
+++ b/DynamicTablesPkg/DynamicTablesPkg.dsc
@@ -4,7 +4,7 @@
 #  Copyright (c) 2019, Linaro Limited. All rights reserved.
 #  Copyright (c) 2019, ARM Limited. All rights reserved.
 #
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##

@@ -39,3 +39,10 @@ [Components.common]

 [BuildOptions]
   *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES
+
+!ifdef STATIC_ANALYSIS
+  # Check all rules
+  # Inhibit C6305: Potential mismatch between sizeof and countof quantities.
+  *_VS2017_*_CC_FLAGS = /wd6305 /analyze
+!endif
+
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46287): https://edk2.groups.io/g/devel/message/46287
Mute This Topic: https://groups.io/mt/32999797/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v1 16/19] DynamicTablesPkg: Option for VS2017 static code analysis

2019-08-23 Thread Sami Mujawar
Add build option STATIC_ANALYSIS to enable VS2017 static
code analysis.

Signed-off-by: Sami Mujawar 
---
 DynamicTablesPkg/DynamicTablesPkg.dsc | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/DynamicTablesPkg/DynamicTablesPkg.dsc 
b/DynamicTablesPkg/DynamicTablesPkg.dsc
index 
dfe6c07111059cdd3eed23becf5000c04270bd9c..6ff6ff019e080f355ca24c9d05f71f8b85ab9077
 100644
--- a/DynamicTablesPkg/DynamicTablesPkg.dsc
+++ b/DynamicTablesPkg/DynamicTablesPkg.dsc
@@ -4,7 +4,7 @@
 #  Copyright (c) 2019, Linaro Limited. All rights reserved.
 #  Copyright (c) 2019, ARM Limited. All rights reserved.
 #
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -39,3 +39,10 @@ [Components.common]
 
 [BuildOptions]
   *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES
+
+!ifdef STATIC_ANALYSIS
+  # Check all rules
+  # Inhibit C6305: Potential mismatch between sizeof and countof quantities.
+  *_VS2017_*_CC_FLAGS = /wd6305 /analyze
+!endif
+
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46276): https://edk2.groups.io/g/devel/message/46276
Mute This Topic: https://groups.io/mt/32999797/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-