From afcfbe9973762d6d2d9776047eac869308387609 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 7 Oct 2022 20:57:21 +0200 Subject: std-aux: workaround unused variable warning with clang 14 and nm_auto cleanup attribute --- src/libnm-std-aux/nm-std-aux.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libnm-std-aux/nm-std-aux.h b/src/libnm-std-aux/nm-std-aux.h index eb16524b88..b404b835c5 100644 --- a/src/libnm-std-aux/nm-std-aux.h +++ b/src/libnm-std-aux/nm-std-aux.h @@ -42,8 +42,8 @@ #endif #endif -#if defined(__clang__) && __clang_major__ == 13 -/* Clang 13 can emit -Wunused-but-set-variable warning for cleanup variables +#if defined(__clang__) && (__clang_major__ == 13 || __clang_major__ == 14) +/* Clang 13/14 can emit -Wunused-but-set-variable warning for cleanup variables * that are only assigned (never used otherwise). Hack around */ #define _nm_auto_extra _nm_unused #else -- cgit v1.2.1