Skip to content

Commit 68d5516

Browse files
JianyuWang0623xiaoxiang781216
authored andcommitted
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 <wangjianyu3@xiaomi.com>
1 parent 515c397 commit 68d5516

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/thermal_dummy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static int dummy_cpufreq_target_index(FAR struct cpufreq_policy *driver,
281281
FAR struct dummy_cpufreq_driver_s **dummy =
282282
(FAR struct dummy_cpufreq_driver_s **)driver;
283283

284-
DEBUGASSERT(index >= 0 && index < (*dummy)->table_len);
284+
DEBUGASSERT(index < (*dummy)->table_len);
285285

286286
(*dummy)->current = (*dummy)->table[index].frequency;
287287
return 0;

0 commit comments

Comments
 (0)