Skip to content

Commit

Permalink
fix cppcheck in lwp.c will fail if no define RT_USING_DFS (#9912)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuzhuzhus authored Jan 14, 2025
1 parent 4343d32 commit 4e37047
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/ci/cpp_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def check(self):
logging.info("Start to static code analysis.")
check_result = True
for file in file_list_filtered:
macros = []
if os.path.basename(file) == 'lwp.c':
macros.append('-DRT_USING_DFS')

result = subprocess.run(
[
'cppcheck',
Expand All @@ -70,7 +74,7 @@ def check(self):
'--error-exitcode=1',
'--force',
file
],
] + macros,
stdout = subprocess.PIPE, stderr = subprocess.PIPE)
logging.info(result.stdout.decode())
logging.info(result.stderr.decode())
Expand Down

0 comments on commit 4e37047

Please sign in to comment.