Fix clang warnings

All are printf() formatter related. Even if a variable is e.g. a
'short', when used in an expression like '<variable> - 1' it is
promoted to an 'int'.

Closes #16
This commit is contained in:
Daniel Eklöf 2020-04-12 18:20:52 +02:00
parent e997ec7e1d
commit 1776f8bf1e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 6 additions and 6 deletions

2
csi.c
View file

@ -58,7 +58,7 @@ csi_as_string(struct terminal *term, uint8_t final, int idx)
i == term->vt.params.idx - 1 ? "" : ";");
}
snprintf(&msg[c], sizeof(msg) - c, "%c (%hhu parameters)",
snprintf(&msg[c], sizeof(msg) - c, "%c (%u parameters)",
final, idx >= 0 ? 1 : term->vt.params.idx);
return msg;
}