From 9d138e73c93b38208bf20ea755db7b54f60e8c9d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 24 Apr 2026 11:35:03 -0500 Subject: [PATCH] [core] Suppress redundant-declaration warning for ESP8266 micros() forward decl --- esphome/core/hal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/esphome/core/hal.h b/esphome/core/hal.h index bd8792e0edd..fab7461ed1c 100644 --- a/esphome/core/hal.h +++ b/esphome/core/hal.h @@ -73,8 +73,10 @@ extern "C" uint32_t platform_is_in_interrupt_context(void); #ifdef USE_ESP8266 // Forward-declared from (esp8266 core) so the inline esphome::micros() -// wrapper below can call it without pulling Arduino.h into every TU. -extern "C" unsigned long micros(void); // NOLINT(google-runtime-int,readability-identifier-naming) +// wrapper below can call it without pulling Arduino.h into every TU. The +// redundant-declaration NOLINT covers TUs that also include Arduino.h directly. +// NOLINTNEXTLINE(google-runtime-int,readability-identifier-naming,readability-redundant-declaration) +extern "C" unsigned long micros(void); #endif #ifdef USE_RP2040