warning suppression

files.c: In function 'do_write_config_file':
files.c:2146:66: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
 2146 |             pline("An error occurred, wrote only partial data (%lu/%lu).",
      |                                                                ~~^
      |                                                                  |
      |                                                                  long unsigned int
      |                                                                %u
 2147 |                   wrote, len);
      |                   ~~~~~
      |                   |
      |                   size_t {aka unsigned int}
files.c:2146:70: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
 2146 |             pline("An error occurred, wrote only partial data (%lu/%lu).",
      |                                                                    ~~^
      |                                                                      |
      |                                                                      long unsigned int
      |                                                                    %u
 2147 |                   wrote, len);
      |                          ~~~
      |                          |
      |                          size_t {aka unsigned int}
This commit is contained in:
nhmall
2023-05-31 22:17:07 -04:00
parent ecd3593163
commit d74e84fb05

View File

@@ -2143,7 +2143,7 @@ do_write_config_file(void)
fclose(fp);
strbuf_empty(&buf);
if (wrote != len)
pline("An error occurred, wrote only partial data (%lu/%lu).",
pline("An error occurred, wrote only partial data (%zu/%zu).",
wrote, len);
}
return ECMD_OK;