mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 15:50:08 +01:00
Shut up clang compiler warnings
clang looks at GCC pragmas, but doesn't understand -Woverride-init. Instead, it uses -Winitializer-overrides. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
parent
e897f6f821
commit
3a2f4ba2f3
1 changed files with 9 additions and 0 deletions
|
|
@ -82,8 +82,13 @@ def print_map(bits):
|
|||
print("};")
|
||||
print("")
|
||||
|
||||
print("#if __clang__")
|
||||
print("#pragma clang diagnostic push")
|
||||
print("#pragma clang diagnostic ignored \"-Winitializer-overrides\"")
|
||||
print("#else")
|
||||
print("#pragma GCC diagnostic push")
|
||||
print("#pragma GCC diagnostic ignored \"-Woverride-init\"")
|
||||
print("#endif")
|
||||
print("static const int ev_max[EV_MAX + 1] = {")
|
||||
print(" [0 ... EV_MAX] = -1,")
|
||||
for prefix in prefixes:
|
||||
|
|
@ -91,7 +96,11 @@ def print_map(bits):
|
|||
continue
|
||||
print(" [EV_%s] = %s_MAX," % (prefix[:-1], prefix[:-1]))
|
||||
print("};")
|
||||
print("#if __clang__")
|
||||
print("#pragma clang diagnostic pop /* \"-Winitializer-overrides\" */")
|
||||
print("#else")
|
||||
print("#pragma GCC diagnostic pop /* \"-Woverride-init\" */")
|
||||
print("#endif");
|
||||
print("")
|
||||
|
||||
def print_python_map(bits):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue