From 2cb0418c955ae50dd259595fc94df7f70d35d0cb Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 10 Jul 2025 12:41:09 -1000 Subject: [PATCH] tweak --- esphome/components/api/proto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/api/proto.h b/esphome/components/api/proto.h index 821c181c06..fe5507450b 100644 --- a/esphome/components/api/proto.h +++ b/esphome/components/api/proto.h @@ -77,8 +77,8 @@ constexpr uint8_t get_wire_type(ProtoFieldType type) { // Macro to calculate field offset without triggering -Winvalid-offsetof // This uses the same approach as offsetof but with explicit reinterpret_cast -#define PROTO_FIELD_OFFSET(Type, Member) \ - static_cast(reinterpret_cast(&reinterpret_cast<(Type) *>(16)->Member) - 16) +#define PROTO_FIELD_OFFSET(Type, Member) /* NOLINT(bugprone-macro-parentheses) */ \ + static_cast(reinterpret_cast(&reinterpret_cast(16)->Member) - 16) /// Representation of a VarInt - in ProtoBuf should be 64bit but we only use 32bit class ProtoVarInt {