]> git.proxmox.com Git - mirror_frr.git/commitdiff
pceplib: Fix clang-16 not happy with build
authorDonald Sharp <donaldsharp72@gmail.com>
Wed, 26 Oct 2022 00:04:43 +0000 (20:04 -0400)
committerDonald Sharp <donaldsharp72@gmail.com>
Wed, 26 Oct 2022 00:04:43 +0000 (20:04 -0400)
In this case it was functions without a prototype

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
pceplib/pcep_msg_messages.c
pceplib/pcep_msg_messages_encoding.c
pceplib/pcep_pcc.c
pceplib/pcep_pcc_api.c
pceplib/pcep_session_logic.c
pceplib/pcep_socket_comm.c
pceplib/pcep_timers.c
pceplib/pcep_utils_double_linked_list.c
pceplib/pcep_utils_logging.c
pceplib/pcep_utils_memory.c
pceplib/pcep_utils_queue.c

index 9bbfc5372b41988ac5f04f1dbabcee61825af2e9..5a244098d43081de5c253bb58cd0592f395723e7 100644 (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));
 }
index e90ca1cfd8289e382d84be1e1f8aa82f197ea7d8..2d27e404072f018e7379160f9fbc01ceca6fcacc 100644 (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));
index 18ccf250ae83ad643a5e164faa0e24753ff93272..47e357729ceb583076d62ba4a7f1bc8d8aa3610d 100644 (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));
index b7813c5a0501e5dbc0a063faa3200d6014841955..75c2b59b66d21935eef97b0ba4dc69acc507e225 100644 (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(
index 78d1072552e2b0cb20c159cfc04825506681ce28..02cf3bffbd74b44feb783fc51cfed282e01df81f 100644 (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",
index e22eb6e675f7c3001ef58a3d94eef46b0a72bb58..4a97c848918604a488a5640cdcdf7ac33d9b140a 100644 (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;
 
index b0f3e70b50dcd861b800f33b1ffda0a348ed2a8a..61fda163637e9721444025fab98fb81998eef0e0 100644 (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;
index 696e46632a467546b6d4b02d5ff22457d99c39b8..7f90df40f24d1aa2102fbcdbd035b5606a43b3da 100644 (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));
index 0286c23078a58eef02f1774b4f19edb080be01cd..c9b2588b4bd66fca973edbe769f3b441d9f534a4 100644 (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_;
 }
index c564705f661924a572e63433a63cb0fd241984aa..10856cac2a6dfd2c5d60ce521601ee3d5433e4f6 100644 (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(
index 627533d01ba89a6d2f0f70ba1cdcdc7d91fce4ca..22e417111ffce0f5b0ae3c8bff8a706ae1d92f5f 100644 (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);