From c4c6da199f0e94893ab50eaa7cc7d52ccec0a0ad Mon Sep 17 00:00:00 2001 From: Bastien Dejean Date: Fri, 10 Feb 2017 22:10:44 +0100 Subject: [PATCH] Fix gcc warnings --- src/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tree.c b/src/tree.c index 5cfdac4..cde9242 100644 --- a/src/tree.c +++ b/src/tree.c @@ -159,7 +159,7 @@ void apply_layout(monitor_t *m, desktop_t *d, node_t *n, layout_t l, xcb_rectang if ((n->first_child->constraints.min_width + n->second_child->constraints.min_width) <= rect.width) { if (fence < n->first_child->constraints.min_width) { fence = n->first_child->constraints.min_width; - } else if (fence > (rect.width - n->second_child->constraints.min_width)) { + } else if (fence > (uint16_t) (rect.width - n->second_child->constraints.min_width)) { fence = (rect.width - n->second_child->constraints.min_width); } n->split_ratio = (double) fence / (double) rect.width; @@ -171,7 +171,7 @@ void apply_layout(monitor_t *m, desktop_t *d, node_t *n, layout_t l, xcb_rectang if ((n->first_child->constraints.min_height + n->second_child->constraints.min_height) <= rect.height) { if (fence < n->first_child->constraints.min_height) { fence = n->first_child->constraints.min_height; - } else if (fence > (rect.height - n->second_child->constraints.min_height)) { + } else if (fence > (uint16_t) (rect.height - n->second_child->constraints.min_height)) { fence = (rect.height - n->second_child->constraints.min_height); } n->split_ratio = (double) fence / (double) rect.height;