From b2bf51f73086b29eb85e7175b4614565edaa1e54 Mon Sep 17 00:00:00 2001 From: Richael Zhuang Date: Wed, 13 Oct 2021 15:12:32 +0800 Subject: [PATCH] test: fix build error about type-limits on arm64 There is an build error on arm64: nvme_compliance.c:203:42: error: comparison is always true due to limited range of data type [-Werror=type-limits] while ((op = getopt(argc, argv, "gr:")) != -1) { For "op" is defined as "char" here. "char" is "unsigned char" on arm and "signed char" on x86 by default. So change its type to "int" to avoid this error. Change-Id: I1f9fa8e0112538e005e8b88c1bfda9257b3f517e Signed-off-by: Richael Zhuang Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9853 Reviewed-by: Aleksey Marchuk Reviewed-by: Jim Harris Reviewed-by: Ben Walker Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI --- test/nvme/compliance/nvme_compliance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/nvme/compliance/nvme_compliance.c b/test/nvme/compliance/nvme_compliance.c index 9ce3a3831..1ef71b36b 100644 --- a/test/nvme/compliance/nvme_compliance.c +++ b/test/nvme/compliance/nvme_compliance.c @@ -303,7 +303,7 @@ delete_io_sq_twice(void) static int parse_args(int argc, char **argv, struct spdk_env_opts *opts) { - char op; + int op; while ((op = getopt(argc, argv, "gr:")) != -1) { switch (op) {