UI 代码纳入规范检查:大括号 K&R 化、strcpy 换 memcpy 等违规修复

- pre-commit 配置:移除 Drivers/BSP/UI/ 整目录排除,14 个 UI 源文件全部受 cppcheck + 规范检查
- ui_net_sink.c:11 处 Allman 大括号归并 K&R,i/c 声明改即用
- ui_port.c:7 处大括号归并
- ui_net_sink_backend_mcu.c:2 处大括号归并
- ui_menu_view.c:menu_frame_t 指针改 const
- ui_page_net_cfg.c:6 处 strcpy 改 memcpy

验证:pre-commit 全钩子通过、模拟器 0 警、菜单/内容页像素回归 PASS、Keil 0 错 0 警
This commit is contained in:
2026-09-13 19:38:14 +08:00
parent cb8cea38b2
commit 34528a9798
6 changed files with 36 additions and 53 deletions
+1 -1
View File
@@ -477,7 +477,7 @@ void ui_menu_view_frame_destroy(uint8_t depth) {
* 函数说明:只改选中数据 + 跟随滚动、重绘框体,不重建对象
*/
void ui_menu_view_frame_refresh(uint8_t depth, uint8_t sel) {
menu_frame_t *f = &s_frame[depth];
const menu_frame_t *f = &s_frame[depth];
/* 未建或越界直接返回 */
if (!f->built || depth >= MENU_PAGE_MAX || sel >= f->item_cnt) {