From eb29ee27ef21c53a3ed0e819bfb44e078912b884 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Fri, 22 Oct 2021 18:13:33 +0200 Subject: [PATCH] bugfix (esp_common): remove infinite recursion in FLAG_ATTR operator Closes https://github.com/espressif/esp-idf/pull/7754 Signed-off-by: Jakob Hasse --- components/esp_common/include/esp_attr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_common/include/esp_attr.h b/components/esp_common/include/esp_attr.h index d6834baa58..84de204618 100644 --- a/components/esp_common/include/esp_attr.h +++ b/components/esp_common/include/esp_attr.h @@ -130,8 +130,8 @@ FORCE_INLINE_ATTR constexpr TYPE operator<< (TYPE a, int b) { return (TYPE)((INT FORCE_INLINE_ATTR TYPE& operator|=(TYPE& a, TYPE b) { a = a | b; return a; } \ FORCE_INLINE_ATTR TYPE& operator&=(TYPE& a, TYPE b) { a = a & b; return a; } \ FORCE_INLINE_ATTR TYPE& operator^=(TYPE& a, TYPE b) { a = a ^ b; return a; } \ -FORCE_INLINE_ATTR TYPE& operator>>=(TYPE& a, int b) { a >>= b; return a; } \ -FORCE_INLINE_ATTR TYPE& operator<<=(TYPE& a, int b) { a <<= b; return a; } +FORCE_INLINE_ATTR TYPE& operator>>=(TYPE& a, int b) { a = a >> b; return a; } \ +FORCE_INLINE_ATTR TYPE& operator<<=(TYPE& a, int b) { a = a << b; return a; } #define FLAG_ATTR_U32(TYPE) FLAG_ATTR_IMPL(TYPE, uint32_t) #define FLAG_ATTR FLAG_ATTR_U32