summaryrefslogtreecommitdiff
path: root/cppu/source/uno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-18 10:46:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-18 11:42:14 +0200
commit2c6cea672a852b85cfb6d2e313d806f257481417 (patch)
treea08212d3478755e580ecf45d7da4881297b1f70e /cppu/source/uno
parent41a967af06a9584a997e11079c3c931d34158c09 (diff)
Work around bogus -Werror=attributes with old GCC
...after 9c3c6a6b661ea8f84c1285b07a502de5c98a1495 "Replace OFFSET_OF macro with a function template", as seen at <https://ci.libreoffice.org//job/lo_tb_master_linux_dbg/38076/>, > /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/check.cxx:263:28: error: ‘maybe_unused’ attribute ignored [-Werror=attributes] > [[maybe_unused]] Char3 chars; > ^~~~~ (Not sure which versions of GCC are affected exactly; lets restrict this to GCC 7 for now.) Change-Id: I28ec8914b60c98dce769ad40ef4141aec4960aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134509 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppu/source/uno')
-rw-r--r--cppu/source/uno/check.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/cppu/source/uno/check.cxx b/cppu/source/uno/check.cxx
index 60ab3dba4e30..e08b0065c4ed 100644
--- a/cppu/source/uno/check.cxx
+++ b/cppu/source/uno/check.cxx
@@ -260,7 +260,14 @@ static_assert(sizeof(second) == sizeof(int), "sizeof(second) != sizeof(int)");
struct Char4
{
+#if defined __GNUC__ && __GNUC__ == 7 && !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wattributes"
+#endif
[[maybe_unused]] Char3 chars;
+#if defined __GNUC__ && __GNUC__ == 7 && !defined __clang__
+#pragma GCC diagnostic pop
+#endif
char c;
};