From e910308f79db05ca4a614e1ca78dcb496518a306 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 10 Jun 2021 07:45:44 +0000 Subject: Fix warnings, from Jan Tache in GitHub issue 2692. --- usr.bin/tmux/format.c | 4 ++-- usr.bin/tmux/server.c | 5 +++-- usr.bin/tmux/tty-term.c | 4 ++-- usr.bin/tmux/window-buffer.c | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 107fca71c2e..9a54ea5f0d1 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.283 2021/04/12 06:50:25 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.284 2021/06/10 07:45:43 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -4199,7 +4199,7 @@ format_replace(struct format_expand_state *es, const char *key, size_t keylen, value = xstrdup("0"); } else { format_log(es, "search '%s' pane %%%u", new, wp->id); - value = format_search(fm, wp, new); + value = format_search(search, wp, new); } free(new); } else if (cmp != NULL) { diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index 6fccb8e4a62..8440a25ba08 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.197 2021/03/11 07:08:18 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.198 2021/06/10 07:45:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -161,7 +161,8 @@ server_tidy_event(__unused int fd, __unused short events, __unused void *data) format_tidy_jobs(); - log_debug("%s: took %llu milliseconds", __func__, get_timer() - t); + log_debug("%s: took %llu milliseconds", __func__, + (unsigned long long)(get_timer() - t)); evtimer_add(&server_ev_tidy, &tv); } diff --git a/usr.bin/tmux/tty-term.c b/usr.bin/tmux/tty-term.c index 8c44fa92b8f..ece706def26 100644 --- a/usr.bin/tmux/tty-term.c +++ b/usr.bin/tmux/tty-term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-term.c,v 1.89 2021/06/10 07:28:45 nicm Exp $ */ +/* $OpenBSD: tty-term.c,v 1.90 2021/06/10 07:45:43 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -688,7 +688,7 @@ tty_term_read_list(const char *name, int fd, char ***caps, u_int *ncaps, ent = &tty_term_codes[i]; switch (ent->type) { case TTYCODE_NONE: - break; + continue; case TTYCODE_STRING: s = tigetstr((char *)ent->name); if (s == NULL || s == (char *)-1) diff --git a/usr.bin/tmux/window-buffer.c b/usr.bin/tmux/window-buffer.c index 23574f18576..9ed665a64df 100644 --- a/usr.bin/tmux/window-buffer.c +++ b/usr.bin/tmux/window-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-buffer.c,v 1.33 2021/04/12 06:50:25 nicm Exp $ */ +/* $OpenBSD: window-buffer.c,v 1.34 2021/06/10 07:45:43 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -294,9 +294,9 @@ window_buffer_get_key(void *modedata, void *itemdata, u_int line) struct window_buffer_modedata *data = modedata; struct window_buffer_itemdata *item = itemdata; struct format_tree *ft; - struct session *s; - struct winlink *wl; - struct window_pane *wp; + struct session *s = NULL; + struct winlink *wl = NULL; + struct window_pane *wp = NULL; struct paste_buffer *pb; char *expanded; key_code key; -- cgit v1.2.3