commit bacd40d6db684e043a8fdcc5f56f349105b53e75
parent 4546ce11889b3b5b29a33b4684d368d74aaea760
Author: Mikkel Oscar Lyderik <mikkeloscar@gmail.com>
Date: Mon, 8 Feb 2016 12:30:42 +0100
Fix clang warnings
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/log.c b/common/log.c
@@ -171,7 +171,7 @@ void error_handler(int sig) {
sway_log(L_ERROR, "Unable to allocate memory to show maps");
break;
}
- sway_log(L_ERROR, m);
+ sway_log(L_ERROR, "%s", m);
}
fclose(maps);
}
diff --git a/sway/commands.c b/sway/commands.c
@@ -870,8 +870,8 @@ static struct cmd_results *cmd_move(int argc, char **argv) {
uint32_t w = size->w - g.size.w;
uint32_t h = size->h - g.size.h;
- view->x = g.origin.x = MIN(w, MAX(x, 0));
- view->y = g.origin.y = MIN(h, MAX(y, 0));
+ view->x = g.origin.x = MIN((int32_t)w, MAX(x, 0));
+ view->y = g.origin.y = MIN((int32_t)h, MAX(y, 0));
wlc_view_set_geometry(view->handle, 0, &g);
}