aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2016-10-31 16:03:50 +1030
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-11-02 15:22:39 +1100
commited9c11c90d30484072a3d39d8b6660992699198e (patch)
treed96db3f88e9849d3a3af181ac91e1c3d64981a76 /external
parentf2ebc1094ec08bde5861ed39c0a2f21153efc7f4 (diff)
downloadskiboot-ed9c11c90d30484072a3d39d8b6660992699198e.zip
skiboot-ed9c11c90d30484072a3d39d8b6660992699198e.tar.gz
skiboot-ed9c11c90d30484072a3d39d8b6660992699198e.tar.bz2
gard: Fix printf warning
With a modern GCC targetting ARM 32-bit: gard.c: In function 'main': gard.c:652:19: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=] fprintf(stderr, "MTD device bigger than %i: size:%lu\n", Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/gard/gard.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c
index 7ec52d8..4b26a3b 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -24,6 +24,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include <limits.h>
+#include <inttypes.h>
#include <ccan/array_size/array_size.h>
@@ -649,7 +650,7 @@ int main(int argc, char **argv)
goto out;
if (bl_size > UINT_MAX) {
- fprintf(stderr, "MTD device bigger than %i: size:%lu\n",
+ fprintf(stderr, "MTD device bigger than %i: size: %" PRIu64 "\n",
UINT_MAX, bl_size);
rc = EXIT_FAILURE;
goto out;