pceplib: Fix clang-16 not happy with build

In this case it was functions without a prototype

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
This commit is contained in:
Donald Sharp 2022-10-25 20:04:43 -04:00
parent c3a02dde41
commit 2816045a6e
11 changed files with 23 additions and 25 deletions

View File

@ -163,7 +163,7 @@ pcep_msg_create_error_with_objects(uint8_t error_type, uint8_t error_value,
return message;
}
struct pcep_message *pcep_msg_create_keepalive()
struct pcep_message *pcep_msg_create_keepalive(void)
{
return (pcep_msg_create_common(PCEP_TYPE_KEEPALIVE));
}

View File

@ -348,7 +348,7 @@ struct pcep_message *pcep_decode_message(const uint8_t *msg_buf)
return msg;
}
struct pcep_versioning *create_default_pcep_versioning()
struct pcep_versioning *create_default_pcep_versioning(void)
{
struct pcep_versioning *versioning =
pceplib_malloc(PCEPLIB_INFRA, sizeof(struct pcep_versioning));

View File

@ -74,7 +74,6 @@ static const short DEFAULT_SRC_TCP_PORT = 4999;
// Private fn's
struct cmd_line_args *get_cmdline_args(int argc, char *argv[]);
void handle_signal_action(int sig_number);
int setup_signals(void);
void send_pce_path_request_message(pcep_session *session);
void send_pce_report_message(pcep_session *session);
void print_queue_event(struct pcep_event *event);
@ -211,8 +210,7 @@ void handle_signal_action(int sig_number)
}
}
int setup_signals()
static int setup_signals(void)
{
struct sigaction sa;
memset(&sa, 0, sizeof(sa));

View File

@ -55,7 +55,7 @@ const char UNKNOWN_EVENT_STR[] = "UNKNOWN Event Type";
/* Session Logic Handle managed in pcep_session_logic.c */
extern pcep_event_queue *session_logic_event_queue_;
bool initialize_pcc()
bool initialize_pcc(void)
{
if (!run_session_logic()) {
pcep_log(LOG_ERR, "%s: Error initializing PCC session logic.",
@ -85,13 +85,13 @@ bool initialize_pcc_infra(struct pceplib_infra_config *infra_config)
/* this function is blocking */
bool initialize_pcc_wait_for_completion()
bool initialize_pcc_wait_for_completion(void)
{
return run_session_logic_wait_for_completion();
}
bool destroy_pcc()
bool destroy_pcc(void)
{
if (!stop_session_logic()) {
pcep_log(LOG_WARNING, "%s: Error stopping PCC session logic.",
@ -103,7 +103,7 @@ bool destroy_pcc()
}
pcep_configuration *create_default_pcep_configuration()
pcep_configuration *create_default_pcep_configuration(void)
{
pcep_configuration *config =
pceplib_malloc(PCEPLIB_INFRA, sizeof(pcep_configuration));
@ -226,7 +226,7 @@ void send_message(pcep_session *session, struct pcep_message *msg,
}
/* Returns true if the queue is empty, false otherwise */
bool event_queue_is_empty()
bool event_queue_is_empty(void)
{
if (session_logic_event_queue_ == NULL) {
pcep_log(
@ -246,7 +246,7 @@ bool event_queue_is_empty()
/* Return the number of events on the queue, 0 if empty */
uint32_t event_queue_num_events_available()
uint32_t event_queue_num_events_available(void)
{
if (session_logic_event_queue_ == NULL) {
pcep_log(
@ -266,7 +266,7 @@ uint32_t event_queue_num_events_available()
/* Return the next event on the queue, NULL if empty */
struct pcep_event *event_queue_get_event()
struct pcep_event *event_queue_get_event(void)
{
if (session_logic_event_queue_ == NULL) {
pcep_log(

View File

@ -111,7 +111,7 @@ static bool run_session_logic_common(void)
}
bool run_session_logic()
bool run_session_logic(void)
{
if (!run_session_logic_common()) {
return false;
@ -234,7 +234,7 @@ bool run_session_logic_with_infra(pceplib_infra_config *infra_config)
return true;
}
bool run_session_logic_wait_for_completion()
bool run_session_logic_wait_for_completion(void)
{
if (!run_session_logic()) {
return false;
@ -247,7 +247,7 @@ bool run_session_logic_wait_for_completion()
}
bool stop_session_logic()
bool stop_session_logic(void)
{
if (session_logic_handle_ == NULL) {
pcep_log(LOG_WARNING, "%s: Session logic already stopped",

View File

@ -62,7 +62,7 @@ int socket_fd_node_compare(void *list_entry, void *new_entry)
}
bool initialize_socket_comm_pre()
bool initialize_socket_comm_pre(void)
{
socket_comm_handle_ =
pceplib_malloc(PCEPLIB_INFRA, sizeof(pcep_socket_comm_handle));
@ -129,7 +129,7 @@ bool initialize_socket_comm_external_infra(
return true;
}
bool initialize_socket_comm_loop()
bool initialize_socket_comm_loop(void)
{
if (socket_comm_handle_ != NULL) {
/* already initialized */
@ -152,7 +152,7 @@ bool initialize_socket_comm_loop()
}
bool destroy_socket_comm_loop()
bool destroy_socket_comm_loop(void)
{
socket_comm_handle_->active = false;

View File

@ -197,7 +197,7 @@ void free_all_timers(pcep_timers_context *timers_context)
}
bool teardown_timers()
bool teardown_timers(void)
{
if (timers_context_ == NULL) {
pcep_log(
@ -252,7 +252,7 @@ bool teardown_timers()
}
int get_next_timer_id()
int get_next_timer_id(void)
{
if (timer_id_ == INT_MAX) {
timer_id_ = 0;

View File

@ -31,7 +31,7 @@
#include "pcep_utils_logging.h"
#include "pcep_utils_memory.h"
double_linked_list *dll_initialize()
double_linked_list *dll_initialize(void)
{
double_linked_list *handle =
pceplib_malloc(PCEPLIB_INFRA, sizeof(double_linked_list));

View File

@ -45,7 +45,7 @@ void set_logging_level(int level)
logging_level_ = level;
}
int get_logging_level()
int get_logging_level(void)
{
return logging_level_;
}

View File

@ -75,7 +75,7 @@ bool pceplib_memory_initialize(void *pceplib_infra_mt,
return true;
}
void pceplib_memory_reset()
void pceplib_memory_reset(void)
{
pceplib_infra_mt.total_bytes_allocated = 0;
pceplib_infra_mt.num_allocates = 0;
@ -88,7 +88,7 @@ void pceplib_memory_reset()
pceplib_messages_mt.num_frees = 0;
}
void pceplib_memory_dump()
void pceplib_memory_dump(void)
{
if (PCEPLIB_INFRA) {
pcep_log(

View File

@ -33,7 +33,7 @@
#include "pcep_utils_memory.h"
#include "pcep_utils_queue.h"
queue_handle *queue_initialize()
queue_handle *queue_initialize(void)
{
/* Set the max_entries to 0 to disable it */
return queue_initialize_with_size(0);