From: Antonio Ospite Date: Sat, 27 Jul 2013 21:01:16 +0000 (+0200) Subject: picoporj: fix another -Wshorten-64-to-32 warning from clang X-Git-Tag: v0.1.4~12 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/1cdf659982e677199167319f06692c813d8c54c2?ds=sidebyside;hp=--cc picoporj: fix another -Wshorten-64-to-32 warning from clang ../examples/picoproj.c:196:8: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] ret = fread(image, size, 1, image_fp); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- 1cdf659982e677199167319f06692c813d8c54c2 diff --git a/examples/picoproj.c b/examples/picoproj.c index b5ce593..e1dc47a 100644 --- a/examples/picoproj.c +++ b/examples/picoproj.c @@ -193,7 +193,7 @@ int main(int argc, char *argv[]) goto out_close_image_fp; } - ret = fread(image, size, 1, image_fp); + ret = (int)fread(image, size, 1, image_fp); if (ret != 1) { if (feof(image_fp)) fprintf(stderr, "Unexpected end of file.\n");