Skip to content

Commit 4e37047

Browse files
authored
fix cppcheck in lwp.c will fail if no define RT_USING_DFS (#9912)
1 parent 4343d32 commit 4e37047

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: tools/ci/cpp_check.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def check(self):
5252
logging.info("Start to static code analysis.")
5353
check_result = True
5454
for file in file_list_filtered:
55+
macros = []
56+
if os.path.basename(file) == 'lwp.c':
57+
macros.append('-DRT_USING_DFS')
58+
5559
result = subprocess.run(
5660
[
5761
'cppcheck',
@@ -70,7 +74,7 @@ def check(self):
7074
'--error-exitcode=1',
7175
'--force',
7276
file
73-
],
77+
] + macros,
7478
stdout = subprocess.PIPE, stderr = subprocess.PIPE)
7579
logging.info(result.stdout.decode())
7680
logging.info(result.stderr.decode())

0 commit comments

Comments
 (0)