forked from len0rd/rockbox
rk27xx-utils: fix compiler warning on amd64
sizeof(...) has type size_t which is long unsigned int on amd64, and so the conversion specifier d without length modifier isn't suitable. There is the length modifier 'z' for size_t arguments, but this is only available on Linux. So casting to unsigned long and using 'lu' is the portable fix. This fixes: rkboottool.c:215: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
This commit is contained in:
parent
5f4e0b6578
commit
bf90197717
1 changed files with 2 additions and 1 deletions
|
@ -212,7 +212,8 @@ int main (int argc, char **argv)
|
|||
{
|
||||
fclose(fp_in);
|
||||
fprintf(stderr, "error: can't read %s file header\n", in_filename);
|
||||
fprintf(stderr, "read %d, expected %d\n", ret, sizeof(rkboot_info));
|
||||
fprintf(stderr, "read %d, expected %lu\n",
|
||||
ret, (unsigned long)sizeof(rkboot_info));
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue