mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 04:10:26 +08:00
fix cppcheck in lwp.c will fail if no define RT_USING_DFS (#9912)
This commit is contained in:
parent
4343d32df4
commit
4e370473c5
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user