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 <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9853
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
Richael Zhuang 2021-10-13 15:12:32 +08:00 committed by Tomasz Zawadzki
parent 4963728855
commit 711a4a70e5

View File

@ -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) {