diff options
author | koekeishiya <aasvi93@hotmail.com> | 2017-08-28 21:15:34 +0200 |
---|---|---|
committer | koekeishiya <aasvi93@hotmail.com> | 2017-08-28 21:15:34 +0200 |
commit | 9768729534d20df12f5eb7372efc2084df841a6f (patch) | |
tree | 883463c94815b4013d12d967085eb2d6b7d1ac13 /src | |
parent | b16df1351629b251db88c931501b37ecdf85f061 (diff) | |
download | skhd-9768729534d20df12f5eb7372efc2084df841a6f.tar.gz skhd-9768729534d20df12f5eb7372efc2084df841a6f.zip |
fix debug build and shut up compiler
Diffstat (limited to 'src')
-rw-r--r-- | src/locale.c | 3 | ||||
-rw-r--r-- | src/parse.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/locale.c b/src/locale.c index 01de49d..75073be 100644 --- a/src/locale.c +++ b/src/locale.c @@ -46,6 +46,8 @@ cfstring_from_keycode(CGKeyCode keycode) return NULL; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wint-to-void-pointer-cast" uint32_t keycode_from_char(char key) { uint32_t keycode = 0; @@ -68,3 +70,4 @@ uint32_t keycode_from_char(char key) return keycode; } +#pragma clang diagnostic pop diff --git a/src/parse.c b/src/parse.c index b279ead..1eaa2d0 100644 --- a/src/parse.c +++ b/src/parse.c @@ -75,7 +75,7 @@ parse_key(struct parser *parser) uint32_t keycode; struct token key = parser_previous(parser); keycode = keycode_from_char(*key.text); - printf("\tkey: '%.*s' (0x%02x)\n", key.length, key.text, keycode); + printf("\tkey: '%c' (0x%02x)\n", *key.text, keycode); return keycode; } @@ -95,6 +95,10 @@ internal uint32_t literal_keycode_value[] = kVK_F19, kVK_F20, }; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wsometimes-uninitialized" +// NOTE(koekeishiya): shut up compiler !!! +// if we get to this point, we already KNOW that the input it valid.. internal uint32_t parse_key_literal(struct parser *parser) { @@ -112,6 +116,7 @@ parse_key_literal(struct parser *parser) return keycode; } +#pragma clang diagnostic pop internal enum hotkey_flag modifier_flags_value[] = { |