summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-10-07 20:57:21 +0200
committerThomas Haller <thaller@redhat.com>2022-10-07 20:57:44 +0200
commitafcfbe9973762d6d2d9776047eac869308387609 (patch)
treed2b2e471855499f7b680d6e7a988fb6c6eb823b6
parent4f60fe293cd5461c47d218b632753ecdfb50cbab (diff)
downloadNetworkManager-afcfbe9973762d6d2d9776047eac869308387609.tar.gz
std-aux: workaround unused variable warning with clang 14 and nm_auto cleanup attribute
-rw-r--r--src/libnm-std-aux/nm-std-aux.h4
1 files 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