Fix warnings, from Jan Tache in GitHub issue 2692.

This commit is contained in:
Nicholas Marriott 2021-05-03 06:39:17 +01:00
parent 2e7ec8c0b9
commit 40467726e3
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

@ -163,7 +163,8 @@ server_tidy_event(__unused int fd, __unused short events, __unused void *data)
malloc_trim(0);
#endif
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

@ -697,7 +697,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;