diff options
author | Cédric Le Goater <clg@kaod.org> | 2016-05-23 19:24:35 +0200 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-06-07 14:03:17 +1000 |
commit | 92a27329d529757677d7eda5a04cf4a366a17495 (patch) | |
tree | 21a8c7a29ddba9e78dc82b6c4a3993307045447b /external | |
parent | 8ae39cde4c1bc48557d926990d77ab8a05418497 (diff) | |
download | skiboot-92a27329d529757677d7eda5a04cf4a366a17495.zip skiboot-92a27329d529757677d7eda5a04cf4a366a17495.tar.gz skiboot-92a27329d529757677d7eda5a04cf4a366a17495.tar.bz2 |
gard: fix compile error on ARM
gard can be used on the BMC to query garded records, but currently
compile fails with :
cc -O2 -Wall -Werror -I. -c gard.c -o gard.o
gard.c: In function 'do_clear_i':
gard.c:421:12: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' [-Werror=format]
gard.c: In function 'check_gard_partition':
gard.c:489:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format]
This patches provides a fix compatible with x86, armel, ppc64.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/gard/gard.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c index 2215864..b2e814e 100644 --- a/external/gard/gard.c +++ b/external/gard/gard.c @@ -417,8 +417,8 @@ static int do_clear_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, v rc = blocklevel_smart_write(ctx->bl, buf_pos - sizeof_gard(ctx), buf, buf_len); free(buf); if (rc) { - fprintf(stderr, "Couldn't write to flash at 0x%08lx for len 0x%08x\n", - buf_pos - sizeof_gard(ctx), buf_len); + fprintf(stderr, "Couldn't write to flash at 0x%08x for len 0x%08x\n", + buf_pos - (int) sizeof_gard(ctx), buf_len); return rc; } } @@ -485,7 +485,7 @@ int check_gard_partition(struct gard_ctx *ctx) if (ctx->gard_data_len == 0 || ctx->gard_data_len % sizeof(struct gard_record) != 0) /* Just warn for now */ fprintf(stderr, "The %s partition doesn't appear to be an exact multiple of" - "gard records in size: %lu vs %u (or partition is zero in length)\n", + "gard records in size: %zd vs %u (or partition is zero in length)\n", FLASH_GARD_PART, sizeof(struct gard_record), ctx->gard_data_len); /* |