diff --git a/components/soc/src/esp32/include/hal/cpu_ll.h b/components/soc/src/esp32/include/hal/cpu_ll.h index f063576fb..d8b3d6a4d 100644 --- a/components/soc/src/esp32/include/hal/cpu_ll.h +++ b/components/soc/src/esp32/include/hal/cpu_ll.h @@ -116,7 +116,7 @@ static inline void cpu_ll_set_watchpoint(int id, //We support watching 2^n byte values, from 1 to 64. Calculate the mask for that. for (int x = 0; x < 7; x++) { - if (size == (1 << x)) { + if (size == (size_t)(1 << x)) { break; } dbreakc <<= 1; diff --git a/components/soc/src/esp32s2/include/hal/cpu_ll.h b/components/soc/src/esp32s2/include/hal/cpu_ll.h index cfcefc3de..c0a96ca6c 100644 --- a/components/soc/src/esp32s2/include/hal/cpu_ll.h +++ b/components/soc/src/esp32s2/include/hal/cpu_ll.h @@ -110,7 +110,7 @@ static inline void cpu_ll_set_watchpoint(int id, //We support watching 2^n byte values, from 1 to 64. Calculate the mask for that. for (int x = 0; x < 7; x++) { - if (size == (1 << x)) { + if (size == (size_t)(1 << x)) { break; } dbreakc <<= 1;