From 099a50a49e8b121a3c25f727d1108f87bc747fa4 Mon Sep 17 00:00:00 2001 From: Wanderingss <1624155937@qq.com> Date: Fri, 13 Nov 2026 16:02:08 +0800 Subject: [PATCH] =?UTF-8?q?chore(ui/sim):=20=E4=BF=AE=20cppcheck=20?= =?UTF-8?q?=E4=B8=A4=E9=A1=B9=E9=A3=8E=E6=A0=BC=E6=8F=90=E7=A4=BA=EF=BC=88?= =?UTF-8?q?=E6=9C=AA=E7=94=A8=E5=8F=98=E9=87=8F=20/=20=E5=8F=AF=E7=BC=A9?= =?UTF-8?q?=E4=BD=9C=E7=94=A8=E5=9F=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 来源:合并后主树全量 ci_local 复跑,manual 阶段 cppcheck(提交期 不跑)抓出两处——sim_publish_data_frames 遗留未用变量 i;待机屏 sb_value_str 变量 n 作用域可缩进挂单位 if 块内。 验证:cppcheck 定向两文件 Passed;双端构建同码同数 (Code=256588 RO=32036 RW=2088 ZI=152584);菜单 8 态与内容页 74 张(含 rtlive A≠B 30 字节差)全过。 --- Drivers/BSP/UI/ui_standby.c | 3 +-- scripts/size_attestation.json | 8 ++++---- simulator/main.c | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Drivers/BSP/UI/ui_standby.c b/Drivers/BSP/UI/ui_standby.c index a175d044..e7bd3117 100644 --- a/Drivers/BSP/UI/ui_standby.c +++ b/Drivers/BSP/UI/ui_standby.c @@ -153,7 +153,6 @@ static uint8_t sb_frame_ready(void) { */ static void sb_value_str(uint32_t a_idx, char *a_buf, uint32_t a_len) { const ui_data_yc_t *p; - uint32_t n; if ((a_idx >= SB_CH_COUNT) || (sb_frame_ready() == 0u) || (s_ch_yc[a_idx] >= (uint8_t)UI_DATA_YC_N)) { @@ -168,7 +167,7 @@ static void sb_value_str(uint32_t a_idx, char *a_buf, uint32_t a_len) { ui_w_editor_fmt_scaled((p->val > 0.0f) ? (int32_t)((p->val * 1000.0f) + 0.5f) : 0, SB_DECIMALS, a_buf, a_len); if (s_rt.eng != (uint8_t)UI_DATA_ENG_PIN) { - n = (uint32_t)strlen(a_buf); + uint32_t n = (uint32_t)strlen(a_buf); if ((n + 1u) < a_len) { a_buf[n] = (a_idx < 3u) ? 'V' : 'A'; a_buf[n + 1u] = (char)0; diff --git a/scripts/size_attestation.json b/scripts/size_attestation.json index 4699d8a9..a8e89b3d 100644 --- a/scripts/size_attestation.json +++ b/scripts/size_attestation.json @@ -1,15 +1,15 @@ { - "built_at": "2026-11-13T14:51:49+08:00", - "fingerprint": "7bca71501bd2582cd221f9cfea5d4db5d196d3d40a583ff119dfd26841355379", + "built_at": "2026-11-13T16:02:07+08:00", + "fingerprint": "f6c08bfe7cee85ff075041fcbdf57f41bb43bd99c6d58fa70bc9fd341d435176", "fingerprint_files": 1479, "fingerprint_source": "git-index", "gated_regions": [ "RW_IRAM1", "RW_CCM" ], - "git_head": "a5142c6d9d11b751d5ff1390bd815f5202bcdabb", + "git_head": "a98d4e06e8fa47dcd15ba5d1364651d1769e4b1b", "map": "MDK-ARM/STM32F407-Demo/STM32F407-Demo.map", - "map_mtime": 1794551787, + "map_mtime": 1794556900, "pct": { "ER_IROM1": 27.53, "RW_CCM": 87.89, diff --git a/simulator/main.c b/simulator/main.c index 457d8e8f..9592c226 100644 --- a/simulator/main.c +++ b/simulator/main.c @@ -1102,7 +1102,6 @@ static void sim_publish_rt_live(uint32_t n) { static void sim_publish_data_frames(void) { ui_data_rt_t rt; ui_data_info_t info; - uint8_t i; ui_data_init();