fix -Wstrict-prototypes issues

This commit is contained in:
Ivan Grokhotkov
2019-03-19 15:06:20 +08:00
committed by David Cermak
parent b263e44777
commit 2ef78857e9
4 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ typedef enum pending_state {
CONFIRMED
} pending_state_t;
outbox_handle_t outbox_init();
outbox_handle_t outbox_init(void);
outbox_item_handle_t outbox_enqueue(outbox_handle_t outbox, outbox_message_handle_t message, int tick);
outbox_item_handle_t outbox_dequeue(outbox_handle_t outbox, pending_state_t pending, int *tick);
outbox_item_handle_t outbox_get(outbox_handle_t outbox, int msg_id);

View File

@ -23,9 +23,9 @@
#include "esp_log.h"
#include "esp_system.h"
char *platform_create_id_string();
char *platform_create_id_string(void);
int platform_random(int max);
long long platform_tick_get_ms();
long long platform_tick_get_ms(void);
void ms_to_timeval(int timeout_ms, struct timeval *tv);
#define ESP_MEM_CHECK(TAG, a, action) if (!(a)) { \

View File

@ -24,7 +24,7 @@ typedef struct outbox_item {
STAILQ_HEAD(outbox_list_t, outbox_item);
outbox_handle_t outbox_init()
outbox_handle_t outbox_init(void)
{
outbox_handle_t outbox = calloc(1, sizeof(struct outbox_list_t));
ESP_MEM_CHECK(TAG, outbox, return NULL);

View File

@ -9,7 +9,7 @@ static const char *TAG = "PLATFORM";
#define MAX_ID_STRING (32)
char *platform_create_id_string()
char *platform_create_id_string(void)
{
uint8_t mac[6];
char *id_string = calloc(1, MAX_ID_STRING);
@ -24,7 +24,7 @@ int platform_random(int max)
return esp_random() % max;
}
long long platform_tick_get_ms()
long long platform_tick_get_ms(void)
{
struct timeval te;
gettimeofday(&te, NULL); // get current time