ldrdf: cast output of sizeof() before passing to printf(), to avoid warning.
authorH. Peter Anvin <hpa@zytor.com>
Mon, 20 Aug 2007 20:02:17 +0000 (20:02 +0000)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 20 Aug 2007 20:02:17 +0000 (20:02 +0000)
The C99 way of doing this would be to use %zu, but that requires intrinsic
C library support.

rdoff/ldrdf.c

index 2ea1af8..e28f284 100644 (file)
@@ -720,8 +720,9 @@ void write_output(const char *filename)
         fseek(ff, 0, SEEK_END);
         if (ftell(ff) > sizeof(hr->g.data)) {
             fprintf(error_file,
-                    "warning: maximum generic record size is %d, rest of file ignored\n",
-                    sizeof(hr->g.data));
+                    "warning: maximum generic record size is %u, "
+                   "rest of file ignored\n",
+                    (unsigned int)sizeof(hr->g.data));
         }
         fclose(ff);