From 4f3323de03e49ec57c89c69b70d8adcbefdddf25 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 5 Oct 2021 20:15:16 +0000 Subject: [PATCH] Fix some warnings. --- usr.bin/tmux/format.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 30e5e0a2277..502361b105b 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.296 2021/10/05 17:23:13 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.297 2021/10/05 20:15:16 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -1622,7 +1622,7 @@ format_cb_mouse_x(struct format_tree *ft) if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED)) { if (ft->m.statusat == 0 && ft->m.y < ft->m.statuslines) return (format_printf("%u", ft->m.x)); - if (ft->m.statusat > 0 && ft->m.y >= ft->m.statusat) + if (ft->m.statusat > 0 && ft->m.y >= (u_int)ft->m.statusat) return (format_printf("%u", ft->m.x)); } return (NULL); @@ -1633,7 +1633,7 @@ static void * format_cb_mouse_y(struct format_tree *ft) { struct window_pane *wp; - u_int x, y, top; + u_int x, y; if (!ft->m.valid) return (NULL); @@ -1643,7 +1643,7 @@ format_cb_mouse_y(struct format_tree *ft) if (ft->c != NULL && (ft->c->tty.flags & TTY_STARTED)) { if (ft->m.statusat == 0 && ft->m.y < ft->m.statuslines) return (format_printf("%u", ft->m.y)); - if (ft->m.statusat > 0 && ft->m.y >= ft->m.statusat) + if (ft->m.statusat > 0 && ft->m.y >= (u_int)ft->m.statusat) return (format_printf("%u", ft->m.y - ft->m.statusat)); } return (NULL); -- 2.20.1