From ed3848130bdcdc62353707116a72a12a2cf64034 Mon Sep 17 00:00:00 2001 From: Wen Xiong Date: Mon, 14 Dec 2015 13:12:53 -0600 Subject: [PATCH] Subject: compilation issue on ppc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.51.0