diff --git a/esphome/components/esp32/core.cpp b/esphome/components/esp32/core.cpp index 0e114d09338..1c631371836 100644 --- a/esphome/components/esp32/core.cpp +++ b/esphome/components/esp32/core.cpp @@ -84,8 +84,7 @@ static StaticTask_t loop_task_tcb; // NOLINT(cppcoreguidelines-avoid-non- static StackType_t loop_task_stack[ESPHOME_LOOP_TASK_STACK_SIZE]; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables) -void __attribute__((optimize("O2"))) // NOLINT(clang-diagnostic-unknown-attributes) -loop_task(void *pv_params) { +void loop_task(void *pv_params) { setup(); while (true) { App.loop(); diff --git a/esphome/core/application.h b/esphome/core/application.h index e55e86f69f2..55578897863 100644 --- a/esphome/core/application.h +++ b/esphome/core/application.h @@ -546,8 +546,7 @@ inline ESPHOME_ALWAYS_INLINE Application::ComponentPhaseGuard::ComponentPhaseGua this->app_.in_loop_ = true; } -// NOLINTNEXTLINE(clang-diagnostic-unknown-attributes) -inline void ESPHOME_ALWAYS_INLINE __attribute__((optimize("O2"))) Application::loop() { +inline void ESPHOME_ALWAYS_INLINE Application::loop() { #ifdef USE_RUNTIME_STATS // Capture the start of the active (non-sleeping) portion of this iteration. // Used to derive main-loop overhead = active time − Σ(component time) −