This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 68d5516c9012bb5c622a3c32cfd1435286e6d748 Author: wangjianyu3 <[email protected]> AuthorDate: Sun Dec 24 15:50:06 2023 +0800 Thermal/dummy: Fix warning ``` CID 1159822: (#1 of 2): 宏将无符号值与 0 做了比较 (NO_EFFECT) unsigned_compare: 不带符号值的此 greater-than-or-equal-to-zero 比较总是为 true。index >= 0U。 ``` Signed-off-by: wangjianyu3 <[email protected]> --- drivers/thermal/thermal_dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_dummy.c b/drivers/thermal/thermal_dummy.c index fa45968b9c..7765a052a7 100644 --- a/drivers/thermal/thermal_dummy.c +++ b/drivers/thermal/thermal_dummy.c @@ -281,7 +281,7 @@ static int dummy_cpufreq_target_index(FAR struct cpufreq_policy *driver, FAR struct dummy_cpufreq_driver_s **dummy = (FAR struct dummy_cpufreq_driver_s **)driver; - DEBUGASSERT(index >= 0 && index < (*dummy)->table_len); + DEBUGASSERT(index < (*dummy)->table_len); (*dummy)->current = (*dummy)->table[index].frequency; return 0;
