Commit 8307eb5f authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

build: enable missing function declaration warning



This helps weed out functions that should be static, functions that are
not declared in public header files, and .c files that don't include
their .h interface headers.

Change-Id: Ie39f83ad4b320847e4a938bd1d4d0b4fa21c2ffa
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent e9fa6560
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ aio_check_io(struct ns_entry *entry)
}
#endif /* HAVE_LIBAIO */

void task_ctor(struct rte_mempool *mp, void *arg, void *__task, unsigned id)
static void task_ctor(struct rte_mempool *mp, void *arg, void *__task, unsigned id)
{
	struct perf_task *task = __task;
	task->buf = rte_malloc(NULL, g_io_size_bytes, 0x200);
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ vtophys_get_map(uint64_t vfn_2mb)
	return map_2mb;
}

uint64_t
static uint64_t
vtophys_get_pfn_2mb(uint64_t vfn_2mb)
{
	uintptr_t vaddr, paddr;
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@
 *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "spdk/file.h"

#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
+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 -Werror -fno-strict-aliasing -march=native -m64 -I$(SPDK_ROOT_DIR)/include
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 += -Wformat -Wformat-security -Wformat-nonliteral

+4 −4
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ nvme_ctrlr_start(struct nvme_controller *ctrlr)
	return 0;
}

void prepare_for_test(uint32_t max_io_queues)
static void prepare_for_test(uint32_t max_io_queues)
{
	struct nvme_driver *driver = &g_nvme_driver;

@@ -86,7 +86,7 @@ void prepare_for_test(uint32_t max_io_queues)
	threads_fail = 0;
}

void *
static void *
nvme_thread(void *arg)
{
	int rc;
@@ -108,7 +108,7 @@ nvme_thread(void *arg)
	pthread_exit(NULL);
}

void
static void
test1(void)
{
	struct nvme_driver *driver = &g_nvme_driver;
@@ -136,7 +136,7 @@ test1(void)
	CU_ASSERT(driver->ioq_index_pool_next == 0);
}

void
static void
test2(void)
{
	int num_threads = 16;
Loading