From 8dfaf6265be52a582cc990f4332808d55063766f Mon Sep 17 00:00:00 2001 From: minus Date: Fri, 21 Aug 2015 16:53:11 +0200 Subject: fixed #108 signed/unsigned comparison --- sway/commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sway/commands.c') diff --git a/sway/commands.c b/sway/commands.c index cb96703e..e90a40a3 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -106,7 +106,7 @@ static bool cmd_bindsym(struct sway_config *config, int argc, char **argv) { // Check for a modifier key int j; bool is_mod = false; - for (j = 0; j < sizeof(modifiers) / sizeof(struct modifier_key); ++j) { + for (j = 0; j < (int)(sizeof(modifiers) / sizeof(struct modifier_key)); ++j) { if (strcasecmp(modifiers[j].name, split->items[i]) == 0) { binding->modifiers |= modifiers[j].mod; is_mod = true; @@ -261,7 +261,7 @@ static bool cmd_floating_mod(struct sway_config *config, int argc, char **argv) // set modifer keys for (i = 0; i < split->length; ++i) { - for (j = 0; j < sizeof(modifiers) / sizeof(struct modifier_key); ++j) { + for (j = 0; j < (int)(sizeof(modifiers) / sizeof(struct modifier_key)); ++j) { if (strcasecmp(modifiers[j].name, split->items[i]) == 0) { config->floating_mod |= modifiers[j].mod; } -- cgit v1.2.3