| Submitter | Shevchenko Andriy (EXT-Teleca/Helsinki) |
|---|---|
| Date | April 18, 2011, 8:31 a.m. |
| Message ID | <802c3655ae5130e95b01e5004710f206a3d9ef9c.1303115468.git.ext-andriy.shevchenko@nokia.com> |
| Download | mbox | patch |
| Permalink | /patch/91699/ |
| State | New |
| Headers | show |
Comments
On Mon, Apr 18, 2011 at 04:31, Andy Shevchenko wrote:
> The argument type of printf is __off64_t, meanwhile the classificator is "%ld".
same response here ... please use PRIu64 instead of casting to long long.
-mike
Patch
diff --git a/serve_image.c b/serve_image.c index f8f28a1..d86e372 100644 --- a/serve_image.c +++ b/serve_image.c @@ -126,8 +126,9 @@ int main(int argc, char **argv) } if (st.st_size % erasesize) { - fprintf(stderr, "Image size %ld bytes is not a multiple of erasesize %d bytes\n", - st.st_size, erasesize); + fprintf(stderr, "Image size %llu bytes is not a multiple of " + "erasesize %d bytes\n", + (unsigned long long)st.st_size, erasesize); exit(1); } image = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, rfd, 0);
The argument type of printf is __off64_t, meanwhile the classificator is "%ld". Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> --- serve_image.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)