From ae784dc74c4c51516f3851615888b4a09c472af7 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sat, 7 Dec 2019 18:53:20 +0100 Subject: [PATCH] Fix CI --- esphome/core/component.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/core/component.cpp b/esphome/core/component.cpp index 6297013247..f4151a14fc 100644 --- a/esphome/core/component.cpp +++ b/esphome/core/component.cpp @@ -139,19 +139,19 @@ float Component::get_actual_setup_priority() const { } void Component::set_setup_priority(float priority) { this->setup_priority_override_ = priority; } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpmf-conversions" bool Component::has_overridden_loop() const { #ifdef CLANG_TIDY bool loop_overridden = true; bool call_loop_overridden = true; #else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpmf-conversions" bool loop_overridden = (void *) (this->*(&Component::loop)) != (void *) (&Component::loop); bool call_loop_overridden = (void *) (this->*(&Component::call_loop)) != (void *) (&Component::call_loop); +#pragma GCC diagnostic pop #endif return loop_overridden || call_loop_overridden; } -#pragma GCC diagnostic pop PollingComponent::PollingComponent(uint32_t update_interval) : Component(), update_interval_(update_interval) {}