Skip to content

Commit

Permalink
Merge pull request #15215 from donaldsharp/pceplib_fixup
Browse files Browse the repository at this point in the history
Compile issue fixups
  • Loading branch information
ton31337 authored Jan 25, 2024
2 parents 147f476 + e208a7e commit f31bc32
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 117 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_rpki.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ static int rpki_create_socket(void *_cache)
else {
ssh_config = cache->tr_config.ssh_config;
host = ssh_config->host;
snprintf(s_port, sizeof(s_port), "%hu", ssh_config->port);
snprintf(s_port, sizeof(s_port), "%u", ssh_config->port);
port = s_port;

hints.ai_flags |= AI_NUMERICHOST;
Expand Down
2 changes: 1 addition & 1 deletion pceplib/pcep_socket_comm_mock.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ bool initialize_socket_comm_external_infra(
return true;
}

bool destroy_socket_comm_loop()
bool destroy_socket_comm_loop(void)
{
mock_socket_metadata.destroy_socket_comm_loop_times_called++;

Expand Down
33 changes: 13 additions & 20 deletions pceplib/test/pcep_msg_messages_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ int pcep_messages_test_suite_teardown(void)
return 0;
}

void pcep_messages_test_setup()
void pcep_messages_test_setup(void)
{
versioning = create_default_pcep_versioning();
}

void pcep_messages_test_teardown()
void pcep_messages_test_teardown(void)
{
destroy_pcep_versioning(versioning);
}

void test_pcep_msg_create_open()
void test_pcep_msg_create_open(void)
{
uint8_t keepalive = 30;
uint8_t deadtimer = 60;
Expand Down Expand Up @@ -96,8 +96,7 @@ void test_pcep_msg_create_open()
pcep_msg_free_message(message);
}


void test_pcep_msg_create_request()
void test_pcep_msg_create_request(void)
{
/* First test with NULL objects */
struct pcep_message *message =
Expand Down Expand Up @@ -185,13 +184,11 @@ void test_pcep_msg_create_request()
pcep_msg_free_message(message);
}


void test_pcep_msg_create_request_svec()
void test_pcep_msg_create_request_svec(void)
{
}


void test_pcep_msg_create_reply_nopath()
void test_pcep_msg_create_reply_nopath(void)
{
struct pcep_object_rp *rp_obj =
pcep_obj_create_rp(0, false, false, false, false, 10, NULL);
Expand Down Expand Up @@ -219,8 +216,7 @@ void test_pcep_msg_create_reply_nopath()
pcep_msg_free_message(message);
}


void test_pcep_msg_create_reply()
void test_pcep_msg_create_reply(void)
{
/* First test with NULL ero and rp objects */
struct pcep_message *message = pcep_msg_create_reply(NULL, NULL);
Expand Down Expand Up @@ -268,8 +264,7 @@ void test_pcep_msg_create_reply()
pcep_msg_free_message(message);
}


void test_pcep_msg_create_close()
void test_pcep_msg_create_close(void)
{
uint8_t reason = PCEP_CLOSE_REASON_UNREC_MSG;

Expand Down Expand Up @@ -301,8 +296,7 @@ void test_pcep_msg_create_close()
pcep_msg_free_message(message);
}


void test_pcep_msg_create_error()
void test_pcep_msg_create_error(void)
{
uint8_t error_type = PCEP_ERRT_RECEPTION_OF_INV_OBJECT;
uint8_t error_value = PCEP_ERRV_KEEPALIVEWAIT_TIMED_OUT;
Expand Down Expand Up @@ -337,8 +331,7 @@ void test_pcep_msg_create_error()
pcep_msg_free_message(message);
}


void test_pcep_msg_create_keepalive()
void test_pcep_msg_create_keepalive(void)
{
struct pcep_message *message = pcep_msg_create_keepalive();
CU_ASSERT_PTR_NOT_NULL(message);
Expand All @@ -356,7 +349,7 @@ void test_pcep_msg_create_keepalive()
pcep_msg_free_message(message);
}

void test_pcep_msg_create_report()
void test_pcep_msg_create_report(void)
{
double_linked_list *obj_list = dll_initialize();

Expand Down Expand Up @@ -387,7 +380,7 @@ void test_pcep_msg_create_report()
pcep_msg_free_message(message);
}

void test_pcep_msg_create_update()
void test_pcep_msg_create_update(void)
{
double_linked_list *obj_list = dll_initialize();
double_linked_list *ero_subobj_list = dll_initialize();
Expand Down Expand Up @@ -439,7 +432,7 @@ void test_pcep_msg_create_update()
pcep_msg_free_message(message);
}

void test_pcep_msg_create_initiate()
void test_pcep_msg_create_initiate(void)
{
double_linked_list *obj_list = dll_initialize();
double_linked_list *ero_subobj_list = dll_initialize();
Expand Down
4 changes: 2 additions & 2 deletions pceplib/test/pcep_msg_object_error_types_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void pcep_object_error_types_test_teardown(void)
{
}

void test_get_error_type_str()
void test_get_error_type_str(void)
{
const char *error_type_str;
int i = 0;
Expand All @@ -57,7 +57,7 @@ void test_get_error_type_str()
CU_ASSERT_PTR_NULL(get_error_type_str(MAX_ERROR_TYPE));
}

void test_get_error_value_str()
void test_get_error_value_str(void)
{
const char *error_value_str;
int i = 0, j = 0;
Expand Down
Loading

0 comments on commit f31bc32

Please sign in to comment.