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

master
Jasper St. Pierre 2014-01-01 13:01:12 -05:00
parent eef3ab2364
commit 0628b9b2b3
2 changed files with 12 additions and 2 deletions

View File

@ -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 {

View File

@ -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;