Commit 2e03f6fe authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

build: enable strict prototypes warning



This catches functions with empty parameter lists, which are not the
same as void parameter lists in C, as well as other (less-likely)
K&R-style parameter lists.

Change-Id: I18b09e01a60b3669d1cc5d8d96eec20cd872c497
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 8307eb5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ endif

OS := $(shell uname)

COMMON_CFLAGS = -g $(C_OPT) -Wall -Wextra -Wno-unused-parameter -Wmissing-declarations -Werror -fno-strict-aliasing -march=native -m64 -I$(SPDK_ROOT_DIR)/include
COMMON_CFLAGS = -g $(C_OPT) -Wall -Wextra -Wno-unused-parameter -Wmissing-declarations -Wstrict-prototypes -Werror -fno-strict-aliasing -march=native -m64 -I$(SPDK_ROOT_DIR)/include

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

+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ static const char *ealargs[] = {
};

static int
vtophys_negative_test()
vtophys_negative_test(void)
{
	void *p = NULL;
	int i;
@@ -82,7 +82,7 @@ vtophys_negative_test()
}

static int
vtophys_positive_test()
vtophys_positive_test(void)
{
	void *p = NULL;
	int i;
+7 −7
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ nvme_ctrlr_submit_admin_request(struct nvme_controller *ctrlr, struct nvme_reque


static void
test_firmware_get_log_page()
test_firmware_get_log_page(void)
{
	struct nvme_controller			ctrlr = {};
	struct nvme_firmware_page		payload = {};
@@ -171,7 +171,7 @@ test_firmware_get_log_page()
}

static void
test_health_get_log_page()
test_health_get_log_page(void)
{
	struct nvme_controller			ctrlr = {};
	struct nvme_health_information_page	payload = {};
@@ -182,7 +182,7 @@ test_health_get_log_page()
}

static void
test_error_get_log_page()
test_error_get_log_page(void)
{
	struct nvme_controller			ctrlr = {};
	struct nvme_error_information_entry	payload = {};
@@ -197,7 +197,7 @@ test_error_get_log_page()
}

static void
test_set_feature_cmd()
test_set_feature_cmd(void)
{
	struct nvme_controller  ctrlr = {};

@@ -208,7 +208,7 @@ test_set_feature_cmd()


static void
test_get_feature_cmd()
test_get_feature_cmd(void)
{
	struct nvme_controller	ctrlr = {};

@@ -218,7 +218,7 @@ test_get_feature_cmd()
}

static void
test_abort_cmd()
test_abort_cmd(void)
{
	struct nvme_controller	ctrlr = {};

@@ -228,7 +228,7 @@ test_abort_cmd()
}

static void
test_io_raw_cmd()
test_io_raw_cmd(void)
{
	struct nvme_controller	ctrlr = {};
	struct nvme_command	cmd = {};