启用constVariablePointer检查并修复6处指针const化

.pre-commit-config.yaml: 移除 --suppress=constVariablePointer
net_select.c: 5 处 p_sock 改 const net_sock_t *(仅只读使用)
net_socket.c: net_getsockname 的 p_sock 改 const(只读字段)
docs/代码规范/cppcheck使用说明.md: 同步抑制表与处理记录
This commit is contained in:
2026-09-01 15:11:17 +08:00
parent 1e964157d7
commit 07afb7b468
4 changed files with 10 additions and 13 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ repos:
'--suppress=invalidPrintfArgType_sint', '--suppress=invalidPrintfArgType_uint',
'--suppress=unusedFunction', '--suppress=unusedStructMember',
'--suppress=noExplicitConstructor', '--suppress=useStlAlgorithm',
'--suppress=constParameterPointer', '--suppress=constParameterCallback',
'--suppress=constVariablePointer', '--suppress=redundantAssignment',
'--suppress=constParameterPointer', '--suppress=constParameterCallback',
'--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']