diff options
| author | zhuzhuzhu <[email protected]> | 2025-01-14 14:21:04 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-01-14 14:21:04 +0800 |
| commit | 4e370473c5f9c52c22310fd97598fc436e1b7856 (patch) | |
| tree | 78b5196c5d5075ebe659135b987d497cf047334e /tools | |
| parent | 4343d32df4c563a52d596e8b5558d90c6d5a9f39 (diff) | |
fix cppcheck in lwp.c will fail if no define RT_USING_DFS (#9912)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/ci/cpp_check.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/ci/cpp_check.py b/tools/ci/cpp_check.py index 8a4e05169f..7f3ca5a439 100644 --- a/tools/ci/cpp_check.py +++ b/tools/ci/cpp_check.py @@ -52,6 +52,10 @@ class CPPCheck: 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', @@ -70,7 +74,7 @@ class CPPCheck: '--error-exitcode=1', '--force', file - ], + ] + macros, stdout = subprocess.PIPE, stderr = subprocess.PIPE) logging.info(result.stdout.decode()) logging.info(result.stderr.decode()) |
