summaryrefslogtreecommitdiff
path: root/scripts/makekeys
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2019-12-27 15:03:10 +0200
committerRan Benita <ran@unusedvar.com>2019-12-27 15:20:25 +0200
commit670566f0d45a6dc623860d7365b0493b7fa92986 (patch)
tree8b88c209f8ffa12b193e35be4a4bfd085c4af121 /scripts/makekeys
parent40bea8e9fa715c099173929149c134525383d3a2 (diff)
downloadxorg-lib-libxkbcommon-670566f0d45a6dc623860d7365b0493b7fa92986.tar.gz
Only add GCC diagnostic pragmas when compiler is GCC compatible
Avoid "unknown pragma" warnings on other compilers. Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'scripts/makekeys')
-rwxr-xr-xscripts/makekeys4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/makekeys b/scripts/makekeys
index 4732f8d..f6a0280 100755
--- a/scripts/makekeys
+++ b/scripts/makekeys
@@ -17,8 +17,10 @@ print('''
entry_offsets = {}
print('''
+#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverlength-strings"
+#endif
static const char *keysym_names =
'''.strip())
offs = 0
@@ -28,7 +30,9 @@ for (name, _) in sorted(entries, key=lambda e: e[0].lower()):
offs += len(name) + 1
print('''
;
+#ifdef __GNUC__
#pragma GCC diagnostic pop
+#endif
'''.strip())
print('''