Skip to content

Commit 58e1100

Browse files
committed
Merge branch 'bugfix/cast_int_to_size_t_in_cpu_ll' into 'master'
soc: cast int to size_t in cpu_ll Closes IDFGH-3352 See merge request espressif/esp-idf!9077
2 parents ee5a630 + 9d58219 commit 58e1100

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/soc/src/esp32/include/hal/cpu_ll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static inline void cpu_ll_set_watchpoint(int id,
116116

117117
//We support watching 2^n byte values, from 1 to 64. Calculate the mask for that.
118118
for (int x = 0; x < 7; x++) {
119-
if (size == (1 << x)) {
119+
if (size == (size_t)(1 << x)) {
120120
break;
121121
}
122122
dbreakc <<= 1;

components/soc/src/esp32s2/include/hal/cpu_ll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static inline void cpu_ll_set_watchpoint(int id,
110110

111111
//We support watching 2^n byte values, from 1 to 64. Calculate the mask for that.
112112
for (int x = 0; x < 7; x++) {
113-
if (size == (1 << x)) {
113+
if (size == (size_t)(1 << x)) {
114114
break;
115115
}
116116
dbreakc <<= 1;

0 commit comments

Comments
 (0)