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>master
parent
40bea8e9fa
commit
670566f0d4
|
@ -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('''
|
||||
|
|
|
@ -5,8 +5,10 @@
|
|||
* https://raw.github.com/xkbcommon/libxkbcommon/master/src/ks_tables.h
|
||||
*/
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Woverlength-strings"
|
||||
#endif
|
||||
static const char *keysym_names =
|
||||
"0\0"
|
||||
"1\0"
|
||||
|
@ -2417,7 +2419,9 @@ static const char *keysym_names =
|
|||
"Zstroke\0"
|
||||
"zstroke\0"
|
||||
;
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
struct name_keysym {
|
||||
xkb_keysym_t keysym;
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
#include "test.h"
|
||||
#include "context.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wmissing-format-attribute"
|
||||
#endif
|
||||
|
||||
static const char *
|
||||
log_level_to_string(enum xkb_log_level level)
|
||||
|
|
|
@ -111,11 +111,11 @@ SOFTWARE.
|
|||
* When adding new keysyms to this file, do not forget to also update the
|
||||
* following as needed:
|
||||
*
|
||||
* - the mappings in src/KeyBind.c in the repo
|
||||
* git://anongit.freedesktop.org/xorg/lib/libX11.git
|
||||
* - the mappings in src/KeyBind.c in the libX11 repo
|
||||
* https://gitlab.freedesktop.org/xorg/lib/libx11
|
||||
*
|
||||
* - the protocol specification in specs/keysyms.xml
|
||||
* in the repo git://anongit.freedesktop.org/xorg/proto/x11proto.git
|
||||
* - the protocol specification in specs/keysyms.xml in this repo
|
||||
* https://gitlab.freedesktop.org/xorg/proto/xorgproto
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue