diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-07-25 15:43:05 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-10-27 11:25:51 -0400 |
commit | bf901977173b8afef6f4b4a9edc4d4903fb7f2bf (patch) | |
tree | 475bf94d58d4817a5e5835bda3fec038c9726e12 /utils/rk27utils/rkboottool/rkboottool.c | |
parent | 5f4e0b6578570f6dede7826760d5bcbb302454c7 (diff) | |
download | rockbox-bf901977173b8afef6f4b4a9edc4d4903fb7f2bf.tar.gz rockbox-bf901977173b8afef6f4b4a9edc4d4903fb7f2bf.zip |
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’
Diffstat (limited to 'utils/rk27utils/rkboottool/rkboottool.c')
-rw-r--r-- | utils/rk27utils/rkboottool/rkboottool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/rk27utils/rkboottool/rkboottool.c b/utils/rk27utils/rkboottool/rkboottool.c index ad08b0b5f6..8858d37478 100644 --- a/utils/rk27utils/rkboottool/rkboottool.c +++ b/utils/rk27utils/rkboottool/rkboottool.c | |||
@@ -212,7 +212,8 @@ int main (int argc, char **argv) | |||
212 | { | 212 | { |
213 | fclose(fp_in); | 213 | fclose(fp_in); |
214 | fprintf(stderr, "error: can't read %s file header\n", in_filename); | 214 | fprintf(stderr, "error: can't read %s file header\n", in_filename); |
215 | fprintf(stderr, "read %d, expected %d\n", ret, sizeof(rkboot_info)); | 215 | fprintf(stderr, "read %d, expected %lu\n", |
216 | ret, (unsigned long)sizeof(rkboot_info)); | ||
216 | return -2; | 217 | return -2; |
217 | } | 218 | } |
218 | 219 | ||