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: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
8307eb5f55
commit
2e03f6fe1c
@ -43,7 +43,7 @@ endif
|
|||||||
|
|
||||||
OS := $(shell uname)
|
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
|
COMMON_CFLAGS += -Wformat -Wformat-security -Wformat-nonliteral
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ static const char *ealargs[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vtophys_negative_test()
|
vtophys_negative_test(void)
|
||||||
{
|
{
|
||||||
void *p = NULL;
|
void *p = NULL;
|
||||||
int i;
|
int i;
|
||||||
@ -82,7 +82,7 @@ vtophys_negative_test()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vtophys_positive_test()
|
vtophys_positive_test(void)
|
||||||
{
|
{
|
||||||
void *p = NULL;
|
void *p = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
@ -160,7 +160,7 @@ nvme_ctrlr_submit_admin_request(struct nvme_controller *ctrlr, struct nvme_reque
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_firmware_get_log_page()
|
test_firmware_get_log_page(void)
|
||||||
{
|
{
|
||||||
struct nvme_controller ctrlr = {};
|
struct nvme_controller ctrlr = {};
|
||||||
struct nvme_firmware_page payload = {};
|
struct nvme_firmware_page payload = {};
|
||||||
@ -171,7 +171,7 @@ test_firmware_get_log_page()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_health_get_log_page()
|
test_health_get_log_page(void)
|
||||||
{
|
{
|
||||||
struct nvme_controller ctrlr = {};
|
struct nvme_controller ctrlr = {};
|
||||||
struct nvme_health_information_page payload = {};
|
struct nvme_health_information_page payload = {};
|
||||||
@ -182,7 +182,7 @@ test_health_get_log_page()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_error_get_log_page()
|
test_error_get_log_page(void)
|
||||||
{
|
{
|
||||||
struct nvme_controller ctrlr = {};
|
struct nvme_controller ctrlr = {};
|
||||||
struct nvme_error_information_entry payload = {};
|
struct nvme_error_information_entry payload = {};
|
||||||
@ -197,7 +197,7 @@ test_error_get_log_page()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_set_feature_cmd()
|
test_set_feature_cmd(void)
|
||||||
{
|
{
|
||||||
struct nvme_controller ctrlr = {};
|
struct nvme_controller ctrlr = {};
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ test_set_feature_cmd()
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_get_feature_cmd()
|
test_get_feature_cmd(void)
|
||||||
{
|
{
|
||||||
struct nvme_controller ctrlr = {};
|
struct nvme_controller ctrlr = {};
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ test_get_feature_cmd()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_abort_cmd()
|
test_abort_cmd(void)
|
||||||
{
|
{
|
||||||
struct nvme_controller ctrlr = {};
|
struct nvme_controller ctrlr = {};
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ test_abort_cmd()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_io_raw_cmd()
|
test_io_raw_cmd(void)
|
||||||
{
|
{
|
||||||
struct nvme_controller ctrlr = {};
|
struct nvme_controller ctrlr = {};
|
||||||
struct nvme_command cmd = {};
|
struct nvme_command cmd = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user