抑制redundantAssignment:HAL清标志宏读寄存器覆盖是正常行为
This commit is contained in:
@@ -48,7 +48,7 @@ repos:
|
||||
--suppress=unusedFunction, --suppress=unusedStructMember,
|
||||
--suppress=noExplicitConstructor, --suppress=useStlAlgorithm,
|
||||
--suppress=constParameterPointer, --suppress=constParameterCallback,
|
||||
--suppress=constVariablePointer,
|
||||
--suppress=constVariablePointer, --suppress=redundantAssignment,
|
||||
-I Inc -I App -I Drivers/BSP,
|
||||
-I Drivers/STM32F4xx_HAL_Driver/Inc -I Drivers/CMSIS/Include,
|
||||
-I Middlewares/Third_Party/FreeRTOS/Source/include]
|
||||
|
||||
@@ -142,6 +142,7 @@ cppcheck 是开源 C/C++ 静态分析工具,**不运行代码**,通过语法
|
||||
| `constVariablePointer` | 局部指针加 const 是好习惯,但当前代码量大、改动多 | 暂时 |
|
||||
| `unusedFunction` | CubeMX 生成的弱符号、第三方库回调被误报 | 永久 |
|
||||
| `unusedStructMember` | HAL 寄存器位域按位操作,cppcheck 不理解 | 永久 |
|
||||
| `redundantAssignment` | HAL 清标志宏(如 `__HAL_SPI_CLEAR_OVRFLAG`)读寄存器覆盖旧值,cppcheck 不理解"读即目的" | 永久 |
|
||||
|
||||
#### 扫描范围
|
||||
|
||||
|
||||
Reference in New Issue
Block a user