From 43d3da2ee7d8e58dccff17dca8650988e45b8b59 Mon Sep 17 00:00:00 2001 From: Slawomir Ptak Date: Wed, 8 Feb 2023 10:32:35 -0500 Subject: [PATCH] ut/nvmf/ctrlr: change consts to defines Fix compile errors on older gcc versions (reproduced on gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0). The error is: initializer element is not constant. Signed-off-by: Slawomir Ptak Change-Id: I3f56304649b141b6422d84257cdc386c5cb14cc4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16718 Tested-by: SPDK CI Jenkins Reviewed-by: Konrad Sztyber Reviewed-by: Jim Harris --- test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c b/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c index ea6ae6584..bc06d3ade 100644 --- a/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c +++ b/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c @@ -27,9 +27,9 @@ struct spdk_bdev { uint32_t max_active_zones; }; -const uint32_t MAX_OPEN_ZONES = 12; -const uint32_t MAX_ACTIVE_ZONES = 34; -const uint32_t ZONE_SIZE = 56; +#define MAX_OPEN_ZONES 12 +#define MAX_ACTIVE_ZONES 34 +#define ZONE_SIZE 56 const char subsystem_default_sn[SPDK_NVME_CTRLR_SN_LEN + 1] = "subsys_default_sn"; const char subsystem_default_mn[SPDK_NVME_CTRLR_MN_LEN + 1] = "subsys_default_mn";