Commit 0628b9b2b3fdce7b32935a2d561643c7c4906696

Jasper St. Pierre 2014-01-01T13:01:12

makekeys: Add a gcc pragma to ignore -Woverlength-strings

diff --git a/makekeys.py b/makekeys.py
index 4cb4282..1939912 100644
--- a/makekeys.py
+++ b/makekeys.py
@@ -16,13 +16,20 @@ print('''
 
 entry_offsets = {}
 
-print('const char *keysym_names =')
+print('''
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverlength-strings"
+const char *keysym_names =
+'''.strip())
 offs = 0
 for (name, _) in sorted(entries, key=lambda e: e[0].lower()):
     entry_offsets[name] = offs
     print('    "{name}\\0"'.format(name=name))
     offs += len(name) + 1
-print(';')
+print('''
+;
+#pragma GCC diagnostic pop
+'''.strip())
 
 print('''
 struct name_keysym {
diff --git a/src/ks_tables.h b/src/ks_tables.h
index c4d3c45..2955f8d 100644
--- a/src/ks_tables.h
+++ b/src/ks_tables.h
@@ -5,6 +5,8 @@
  * https://raw.github.com/xkbcommon/libxkbcommon/master/src/ks_tables.h
  */
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverlength-strings"
 const char *keysym_names =
     "0\0"
     "1\0"
@@ -2409,6 +2411,7 @@ const char *keysym_names =
     "Zstroke\0"
     "zstroke\0"
 ;
+#pragma GCC diagnostic pop
 
 struct name_keysym {
     xkb_keysym_t keysym;