From: Wen Xiong Date: Mon, 14 Dec 2015 19:12:53 +0000 (-0600) Subject: Subject: compilation issue on ppc. X-Git-Tag: v0.3~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ed3848130;p=users%2Fsagi%2Fnvme-cli.git Subject: compilation issue on ppc. We saw the following compilation issue on ppc. [root@everest-lp2 nvme-cli]# make cc -I ./src -D_GNU_SOURCE -std=gnu99 -O2 -g -Wall -Werror -DNVME_VERSION='"0.2.15.gc4c2"' nvme.c -o nvme argconfig. o suffix.o common.o nvme.c: In function âmânvme.c:2227:2: error: passing argument 2 of âgconfig_parse_comma_sep_array_longârom incompatible pointer type [- Werror] ns = argconfig_parse_comma_sep_array_long(cfg.slbas, slbas, 256); ^ In file included from nvme.c:52:0: src/argconfig.h:106:10: note: expected âng long unsigned int *âut argument is of type âu64 *âunsigned argconfig_parse_comma_sep_array_long(char *string, unsigned long long *ret, ^ cc1: all warnings being treated as errors make: *** [nvme] Error 1 Signed-off-by: Wen Xiong --- diff --git a/nvme.c b/nvme.c index 59cc051b..c64d42c5 100644 --- a/nvme.c +++ b/nvme.c @@ -2224,7 +2224,7 @@ static int dsm(int argc, char **argv) nc = argconfig_parse_comma_sep_array(cfg.ctx_attrs, (int *)ctx_attrs, 256); nb = argconfig_parse_comma_sep_array(cfg.blocks, (int *)nlbs, 256); - ns = argconfig_parse_comma_sep_array_long(cfg.slbas, slbas, 256); + ns = argconfig_parse_comma_sep_array_long(cfg.slbas, (unsigned long long *)slbas, 256); nr = max(nc, max(nb, ns)); if (!nr || nr > 256) { fprintf(stderr, "No range definition provided\n");