firmware-utils: fix all -Wformat warnings

1. Use %hhu for uint8_t
2. Use %z for size_t

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
Rafał Miłecki
2021-04-09 00:10:53 +02:00
parent d92a9c97bf
commit e65b633a5b
2 changed files with 3 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ static void parse_options(int argc, char **argv) {
productid = optarg;
break;
case 'v':
if (sscanf(optarg, "%hu.%hu.%hu.%hu", &version[0], &version[1], &version[2], &version[3]) != 4)
if (sscanf(optarg, "%hhu.%hhu.%hhu.%hhu", &version[0], &version[1], &version[2], &version[3]) != 4)
fprintf(stderr, "Version %s doesn't match suppored 4-digits format\n", optarg);
break;
}