mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Fix some warnings, GitHub issue 2382.
This commit is contained in:
parent
ec9e03d09a
commit
cf8ef63c4a
5
format.c
5
format.c
@ -1372,7 +1372,6 @@ format_pretty_time(time_t t)
|
||||
struct tm now_tm, tm;
|
||||
time_t now, age;
|
||||
char s[6];
|
||||
int m;
|
||||
|
||||
time(&now);
|
||||
if (now < t)
|
||||
@ -1396,10 +1395,6 @@ format_pretty_time(time_t t)
|
||||
}
|
||||
|
||||
/* Last 12 months. */
|
||||
if (now_tm.tm_mon == 0)
|
||||
m = 11;
|
||||
else
|
||||
m = now_tm.tm_mon - 1;
|
||||
if ((tm.tm_year == now_tm.tm_year && tm.tm_mon < now_tm.tm_mon) ||
|
||||
(tm.tm_year == now_tm.tm_year - 1 && tm.tm_mon > now_tm.tm_mon)) {
|
||||
strftime(s, sizeof s, "%d%b", &tm);
|
||||
|
2
menu.c
2
menu.c
@ -187,7 +187,7 @@ menu_key_cb(struct client *c, struct key_event *event)
|
||||
struct mouse_event *m = &event->m;
|
||||
u_int i;
|
||||
int count = menu->count, old = md->choice;
|
||||
const char *name;
|
||||
const char *name = NULL;
|
||||
const struct menu_item *item;
|
||||
struct cmdq_state *state;
|
||||
enum cmd_parse_status status;
|
||||
|
4
utf8.c
4
utf8.c
@ -100,9 +100,9 @@ utf8_put_item(const char *data, size_t size, u_int *index)
|
||||
|
||||
ui = utf8_item_by_data(data, size);
|
||||
if (ui != NULL) {
|
||||
*index = ui->index;
|
||||
log_debug("%s: found %.*s = %u", __func__, (int)size, data,
|
||||
*index);
|
||||
*index = ui->index;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -117,8 +117,8 @@ utf8_put_item(const char *data, size_t size, u_int *index)
|
||||
ui->size = size;
|
||||
RB_INSERT(utf8_data_tree, &utf8_data_tree, ui);
|
||||
|
||||
log_debug("%s: added %.*s = %u", __func__, (int)size, data, *index);
|
||||
*index = ui->index;
|
||||
log_debug("%s: added %.*s = %u", __func__, (int)size, data, *index);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user