Commit fd93c1b1 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

build: enable missing field initializer warning



Replace {0} initializers with {}, since it is equivalent and simpler
(and avoids the warning).

Change-Id: Id2014a352e2c627598cd3b4f1ca04dba35f2dc3a
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent a945f60c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ get_log_page_completion(void *cb_arg, const struct nvme_completion *cpl)
static int
get_feature(struct nvme_controller *ctrlr, uint8_t fid)
{
	struct nvme_command cmd = {0};
	struct nvme_command cmd = {};

	cmd.opc = NVME_OPC_GET_FEATURES;
	cmd.cdw10 = fid;
@@ -120,7 +120,7 @@ get_features(struct nvme_controller *ctrlr)
static int
get_health_log_page(struct nvme_controller *ctrlr)
{
	struct nvme_command cmd = {0};
	struct nvme_command cmd = {};

	if (health_page == NULL) {
		health_page = rte_zmalloc("nvme health", sizeof(*health_page), 4096);
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ endif

OS := $(shell uname)

COMMON_CFLAGS = -g $(C_OPT) -Wall -Wsign-compare -Werror -fno-strict-aliasing -march=native -m64 -I$(SPDK_ROOT_DIR)/include
COMMON_CFLAGS = -g $(C_OPT) -Wall -Wsign-compare -Wmissing-field-initializers -Werror -fno-strict-aliasing -march=native -m64 -I$(SPDK_ROOT_DIR)/include

COMMON_CFLAGS += -Wformat -Wformat-security -Wformat-nonliteral

+3 −3
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ static void set_feature_completion(void *arg, const struct nvme_completion *cpl)
static int
set_temp_threshold(struct dev *dev, uint32_t temp)
{
	struct nvme_command cmd = {0};
	struct nvme_command cmd = {};

	cmd.opc = NVME_OPC_SET_FEATURES;
	cmd.cdw10 = NVME_FEAT_TEMPERATURE_THRESHOLD;
@@ -106,7 +106,7 @@ get_feature_completion(void *cb_arg, const struct nvme_completion *cpl)
static int
get_temp_threshold(struct dev *dev)
{
	struct nvme_command cmd = {0};
	struct nvme_command cmd = {};

	cmd.opc = NVME_OPC_GET_FEATURES;
	cmd.cdw10 = NVME_FEAT_TEMPERATURE_THRESHOLD;
@@ -138,7 +138,7 @@ get_log_page_completion(void *cb_arg, const struct nvme_completion *cpl)
static int
get_health_log_page(struct dev *dev)
{
	struct nvme_command cmd = {0};
	struct nvme_command cmd = {};

	cmd.opc = NVME_OPC_GET_LOG_PAGE;
	cmd.cdw10 = NVME_LOG_HEALTH_INFORMATION;
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ void verify_abort_cmd(struct nvme_request *req)

void verify_io_raw_cmd(struct nvme_request *req)
{
	struct nvme_command	command = {0};
	struct nvme_command	command = {};

	CU_ASSERT(memcmp(&req->cmd, &command, sizeof(req->cmd)) == 0);
}