From 0eb7391e716db9b4d009ad6aa5ce51eb7290e38d Mon Sep 17 00:00:00 2001 From: Roger Light Date: Thu, 6 May 2021 00:06:58 +0100 Subject: [PATCH] Fix tests and db_dump compilation. --- apps/db_dump/stubs.c | 4 +--- test/unit/persist_read_stubs.c | 4 +--- test/unit/persist_write_stubs.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/db_dump/stubs.c b/apps/db_dump/stubs.c index f9cfff9d..fccb6d83 100644 --- a/apps/db_dump/stubs.c +++ b/apps/db_dump/stubs.c @@ -10,10 +10,8 @@ # define UNUSED(A) (void)(A) #endif -struct mosquitto *context__init(mosq_sock_t sock) +struct mosquitto *context__init(void) { - UNUSED(sock); - return NULL; } diff --git a/test/unit/persist_read_stubs.c b/test/unit/persist_read_stubs.c index b58be660..015c687f 100644 --- a/test/unit/persist_read_stubs.c +++ b/test/unit/persist_read_stubs.c @@ -14,12 +14,10 @@ extern int last_qos; extern uint32_t last_identifier; extern struct mosquitto_db db; -struct mosquitto *context__init(mosq_sock_t sock) +struct mosquitto *context__init(void) { struct mosquitto *m; - UNUSED(sock); - m = mosquitto__calloc(1, sizeof(struct mosquitto)); if(m){ m->msgs_in.inflight_maximum = 20; diff --git a/test/unit/persist_write_stubs.c b/test/unit/persist_write_stubs.c index 9778ac6d..060e20b7 100644 --- a/test/unit/persist_write_stubs.c +++ b/test/unit/persist_write_stubs.c @@ -13,10 +13,8 @@ extern uint64_t last_retained; extern char *last_sub; extern int last_qos; -struct mosquitto *context__init(mosq_sock_t sock) +struct mosquitto *context__init(void) { - UNUSED(sock); - return mosquitto__calloc(1, sizeof(struct mosquitto)); }