Skip to content

Commit

Permalink
Thermal/dummy: Fix warning
Browse files Browse the repository at this point in the history
```
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]>
  • Loading branch information
JianyuWang0623 authored and xiaoxiang781216 committed Sep 23, 2024
1 parent 515c397 commit 68d5516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/thermal_dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 68d5516

Please sign in to comment.