ui.c: In function ‘PrintAndLogOptions’:
ui.c:40:45: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
snprintf(format, sizeof(format), "%%%us%%%us", space, counts[j]);
^
ui.c:40:50: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
snprintf(format, sizeof(format), "%%%us%%%us", space, counts[j]);
^
ui.c:42:54: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
snprintf(format, sizeof(format), "%%%us%%-%us", space, counts[j]);
^
ui.c:42:60: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
snprintf(format, sizeof(format), "%%%us%%-%us", space, counts[j]);
This fix resolves the warnings as printed below.
ui.c: In function ‘PrintAndLogOptions’: ui.c:40:45: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=] snprintf(format, sizeof(format), "%%%us%%%us", space, counts[j]); ^ ui.c:40:50: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=] snprintf(format, sizeof(format), "%%%us%%%us", space, counts[j]); ^ ui.c:42:54: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=] snprintf(format, sizeof(format), "%%%us%%-%us", space, counts[j]); ^ ui.c:42:60: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=] snprintf(format, sizeof(format), "%%%us%%-%us", space, counts[j]);