makekeys: Add a gcc pragma to ignore -Woverlength-strings
parent
eef3ab2364
commit
0628b9b2b3
11
makekeys.py
11
makekeys.py
|
@ -16,13 +16,20 @@ print('''
|
||||||
|
|
||||||
entry_offsets = {}
|
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
|
offs = 0
|
||||||
for (name, _) in sorted(entries, key=lambda e: e[0].lower()):
|
for (name, _) in sorted(entries, key=lambda e: e[0].lower()):
|
||||||
entry_offsets[name] = offs
|
entry_offsets[name] = offs
|
||||||
print(' "{name}\\0"'.format(name=name))
|
print(' "{name}\\0"'.format(name=name))
|
||||||
offs += len(name) + 1
|
offs += len(name) + 1
|
||||||
print(';')
|
print('''
|
||||||
|
;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
'''.strip())
|
||||||
|
|
||||||
print('''
|
print('''
|
||||||
struct name_keysym {
|
struct name_keysym {
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
* https://raw.github.com/xkbcommon/libxkbcommon/master/src/ks_tables.h
|
* 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 =
|
const char *keysym_names =
|
||||||
"0\0"
|
"0\0"
|
||||||
"1\0"
|
"1\0"
|
||||||
|
@ -2409,6 +2411,7 @@ const char *keysym_names =
|
||||||
"Zstroke\0"
|
"Zstroke\0"
|
||||||
"zstroke\0"
|
"zstroke\0"
|
||||||
;
|
;
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
struct name_keysym {
|
struct name_keysym {
|
||||||
xkb_keysym_t keysym;
|
xkb_keysym_t keysym;
|
||||||
|
|
Loading…
Reference in New Issue