aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefile2
-rw-r--r--src/locale.c3
-rw-r--r--src/parse.c7
3 files changed, 10 insertions, 2 deletions
diff --git a/makefile b/makefile
index 808e949..aa697b3 100644
--- a/makefile
+++ b/makefile
@@ -1,6 +1,6 @@
FRAMEWORKS = -framework Carbon
BUILD_PATH = ./bin
-BUILD_FLAGS = -std=c99 -Wall -g
+BUILD_FLAGS = -std=c99 -Wall -g -O0
SKHD_SRC = ./src/skhd.c
BINS = $(BUILD_PATH)/skhd
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[] =
{