1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 03:56:44 +02:00

Fix unused variable warnings and change all (void)s to UNUSED macro

This commit is contained in:
jfreegman
2020-03-30 12:56:42 -04:00
parent 46513017e3
commit ddc8c53abf
9 changed files with 32 additions and 14 deletions

View File

@ -901,7 +901,7 @@ static void init_infobox(ToxWindow *self)
return;
}
(void) y2;
UNUSED_VAR(y2);
memset(&ctx->infobox, 0, sizeof(struct infobox));
@ -1011,6 +1011,8 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr)
getyx(self->window, y, x);
getmaxyx(self->window, y2, x2);
UNUSED_VAR(y);
if (y2 <= 0 || x2 <= 0) {
return;
}
@ -1239,7 +1241,9 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
int y, x;
getyx(self->window, y, x);
(void) x;
UNUSED_VAR(x);
int new_x = ctx->start ? x2 - 1 : MAX(0, wcswidth(ctx->line, ctx->pos));
wmove(self->window, y + 1, new_x);