Fix warnings, from Jan Tache in GitHub issue 2692.

pull/2755/head
nicm 2021-06-10 07:45:43 +00:00
parent 02a6b39db7
commit 6c659494f5
4 changed files with 7 additions and 6 deletions

View File

@ -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) {

View File

@ -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);
}

View File

@ -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)

View File

@ -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;