summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pceplib/pcep_socket_comm_mock.c2
-rw-r--r--pceplib/test/pcep_msg_messages_test.c33
-rw-r--r--pceplib/test/pcep_msg_object_error_types_test.c4
-rw-r--r--pceplib/test/pcep_msg_objects_test.c71
-rw-r--r--pceplib/test/pcep_msg_tlvs_test.c47
-rw-r--r--pceplib/test/pcep_msg_tools_test.c24
-rw-r--r--pceplib/test/pcep_pcc_api_test.c24
-rw-r--r--pceplib/test/pcep_utils_counters_test.c24
8 files changed, 113 insertions, 116 deletions
diff --git a/pceplib/pcep_socket_comm_mock.c b/pceplib/pcep_socket_comm_mock.c
index 24755efee..bda9b1ffd 100644
--- a/pceplib/pcep_socket_comm_mock.c
+++ b/pceplib/pcep_socket_comm_mock.c
@@ -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++;
diff --git a/pceplib/test/pcep_msg_messages_test.c b/pceplib/test/pcep_msg_messages_test.c
index c4eaeaab2..3468d1723 100644
--- a/pceplib/test/pcep_msg_messages_test.c
+++ b/pceplib/test/pcep_msg_messages_test.c
@@ -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;
@@ -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 =
@@ -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);
@@ -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);
@@ -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;
@@ -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;
@@ -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);
@@ -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();
@@ -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();
@@ -442,7 +435,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();
diff --git a/pceplib/test/pcep_msg_object_error_types_test.c b/pceplib/test/pcep_msg_object_error_types_test.c
index 3237fecb1..b7198fbe6 100644
--- a/pceplib/test/pcep_msg_object_error_types_test.c
+++ b/pceplib/test/pcep_msg_object_error_types_test.c
@@ -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;
@@ -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;
diff --git a/pceplib/test/pcep_msg_objects_test.c b/pceplib/test/pcep_msg_objects_test.c
index 1315fe3f3..0a1d34d55 100644
--- a/pceplib/test/pcep_msg_objects_test.c
+++ b/pceplib/test/pcep_msg_objects_test.c
@@ -49,18 +49,18 @@ int pcep_objects_test_suite_teardown(void)
return 0;
}
-void reset_objects_buffer()
+void reset_objects_buffer(void)
{
memset(object_buf, 0, 2000);
}
-void pcep_objects_test_setup()
+void pcep_objects_test_setup(void)
{
versioning = create_default_pcep_versioning();
reset_objects_buffer();
}
-void pcep_objects_test_teardown()
+void pcep_objects_test_teardown(void)
{
destroy_pcep_versioning(versioning);
}
@@ -123,7 +123,7 @@ static void verify_pcep_obj_header(uint8_t obj_class, uint8_t obj_type,
obj_hdr->encoded_object);
}
-void test_pcep_obj_create_open()
+void test_pcep_obj_create_open(void)
{
uint8_t deadtimer = 60;
uint8_t keepalive = 30;
@@ -147,7 +147,7 @@ void test_pcep_obj_create_open()
pcep_obj_free_object((struct pcep_object_header *)open);
}
-void test_pcep_obj_create_open_with_tlvs()
+void test_pcep_obj_create_open_with_tlvs(void)
{
uint8_t deadtimer = 60;
uint8_t keepalive = 30;
@@ -182,7 +182,7 @@ void test_pcep_obj_create_open_with_tlvs()
pcep_obj_free_object((struct pcep_object_header *)open);
}
-void test_pcep_obj_create_rp()
+void test_pcep_obj_create_rp(void)
{
uint32_t reqid = 15;
uint8_t invalid_priority = 100;
@@ -213,7 +213,7 @@ void test_pcep_obj_create_rp()
pcep_obj_free_object((struct pcep_object_header *)rp);
}
-void test_pcep_obj_create_nopath()
+void test_pcep_obj_create_nopath(void)
{
uint8_t ni = 8;
uint32_t errorcode = 42;
@@ -251,7 +251,8 @@ void test_pcep_obj_create_nopath()
pcep_obj_free_object((struct pcep_object_header *)nopath);
}
-void test_pcep_obj_create_association_ipv4()
+
+void test_pcep_obj_create_association_ipv4(void)
{
uint16_t all_assoc_groups = 0xffff;
@@ -275,7 +276,7 @@ void test_pcep_obj_create_association_ipv4()
pcep_obj_free_object((struct pcep_object_header *)assoc);
}
-void test_pcep_obj_create_association_ipv6()
+void test_pcep_obj_create_association_ipv6(void)
{
uint32_t all_assoc_groups = 0xffff;
struct in6_addr src;
@@ -305,7 +306,7 @@ void test_pcep_obj_create_association_ipv6()
pcep_obj_free_object((struct pcep_object_header *)assoc);
}
-void test_pcep_obj_create_endpoint_ipv4()
+void test_pcep_obj_create_endpoint_ipv4(void)
{
struct in_addr src_ipv4, dst_ipv4;
inet_pton(AF_INET, "192.168.1.2", &src_ipv4);
@@ -334,7 +335,7 @@ void test_pcep_obj_create_endpoint_ipv4()
pcep_obj_free_object((struct pcep_object_header *)ipv4);
}
-void test_pcep_obj_create_endpoint_ipv6()
+void test_pcep_obj_create_endpoint_ipv6(void)
{
struct in6_addr src_ipv6, dst_ipv6;
inet_pton(AF_INET6, "2001:db8::8a2e:370:7334", &src_ipv6);
@@ -368,7 +369,7 @@ void test_pcep_obj_create_endpoint_ipv6()
pcep_obj_free_object((struct pcep_object_header *)ipv6);
}
-void test_pcep_obj_create_bandwidth()
+void test_pcep_obj_create_bandwidth(void)
{
/* 1.8 => binary 1.11001101
* exponent = 127 => 0111 1111
@@ -389,7 +390,7 @@ void test_pcep_obj_create_bandwidth()
pcep_obj_free_object((struct pcep_object_header *)bw);
}
-void test_pcep_obj_create_metric()
+void test_pcep_obj_create_metric(void)
{
uint8_t type = PCEP_METRIC_BORDER_NODE_COUNT;
/* https://en.wikipedia.org/wiki/IEEE_754-1985
@@ -421,7 +422,7 @@ void test_pcep_obj_create_metric()
pcep_obj_free_object((struct pcep_object_header *)metric);
}
-void test_pcep_obj_create_lspa()
+void test_pcep_obj_create_lspa(void)
{
uint32_t exclude_any = 10;
uint32_t include_any = 20;
@@ -448,7 +449,7 @@ void test_pcep_obj_create_lspa()
pcep_obj_free_object((struct pcep_object_header *)lspa);
}
-void test_pcep_obj_create_svec()
+void test_pcep_obj_create_svec(void)
{
struct pcep_object_svec *svec =
pcep_obj_create_svec(true, true, true, NULL);
@@ -479,7 +480,7 @@ void test_pcep_obj_create_svec()
pcep_obj_free_object((struct pcep_object_header *)svec);
}
-void test_pcep_obj_create_error()
+void test_pcep_obj_create_error(void)
{
uint8_t error_type = PCEP_ERRT_SESSION_FAILURE;
uint8_t error_value = PCEP_ERRV_RECVD_INVALID_OPEN_MSG;
@@ -499,7 +500,7 @@ void test_pcep_obj_create_error()
pcep_obj_free_object((struct pcep_object_header *)error);
}
-void test_pcep_obj_create_close()
+void test_pcep_obj_create_close(void)
{
uint8_t reason = PCEP_CLOSE_REASON_DEADTIMER;
@@ -517,7 +518,7 @@ void test_pcep_obj_create_close()
pcep_obj_free_object((struct pcep_object_header *)close);
}
-void test_pcep_obj_create_srp()
+void test_pcep_obj_create_srp(void)
{
bool lsp_remove = true;
uint32_t srp_id_number = 0x89674523;
@@ -538,7 +539,7 @@ void test_pcep_obj_create_srp()
pcep_obj_free_object((struct pcep_object_header *)srp);
}
-void test_pcep_obj_create_lsp()
+void test_pcep_obj_create_lsp(void)
{
uint32_t plsp_id = 0x000fffff;
enum pcep_lsp_operational_status status = PCEP_LSP_OPERATIONAL_ACTIVE;
@@ -579,7 +580,7 @@ void test_pcep_obj_create_lsp()
pcep_obj_free_object((struct pcep_object_header *)lsp);
}
-void test_pcep_obj_create_vendor_info()
+void test_pcep_obj_create_vendor_info(void)
{
uint32_t enterprise_number = 0x01020304;
uint32_t enterprise_specific_info = 0x05060708;
@@ -645,19 +646,19 @@ static void test_pcep_obj_create_object_common(ro_func func_to_test,
pcep_obj_free_object((struct pcep_object_header *)ero);
}
-void test_pcep_obj_create_ero()
+void test_pcep_obj_create_ero(void)
{
test_pcep_obj_create_object_common(
pcep_obj_create_ero, PCEP_OBJ_CLASS_ERO, PCEP_OBJ_TYPE_ERO);
}
-void test_pcep_obj_create_rro()
+void test_pcep_obj_create_rro(void)
{
test_pcep_obj_create_object_common(
pcep_obj_create_rro, PCEP_OBJ_CLASS_RRO, PCEP_OBJ_TYPE_RRO);
}
-void test_pcep_obj_create_iro()
+void test_pcep_obj_create_iro(void)
{
test_pcep_obj_create_object_common(
pcep_obj_create_iro, PCEP_OBJ_CLASS_IRO, PCEP_OBJ_TYPE_IRO);
@@ -731,7 +732,7 @@ verify_pcep_obj_ro_sr_header(struct pcep_object_ro *ro,
}
}
-void test_pcep_obj_create_ro_subobj_ipv4()
+void test_pcep_obj_create_ro_subobj_ipv4(void)
{
struct in_addr ro_ipv4;
inet_pton(AF_INET, "192.168.1.2", &ro_ipv4);
@@ -768,7 +769,7 @@ void test_pcep_obj_create_ro_subobj_ipv4()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_ipv6()
+void test_pcep_obj_create_ro_subobj_ipv6(void)
{
struct in6_addr ro_ipv6;
uint8_t prefix_len = 16;
@@ -811,7 +812,7 @@ void test_pcep_obj_create_ro_subobj_ipv6()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_unnum()
+void test_pcep_obj_create_ro_subobj_unnum(void)
{
struct in_addr router_id;
uint32_t if_id = 123;
@@ -836,7 +837,7 @@ void test_pcep_obj_create_ro_subobj_unnum()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_32label()
+void test_pcep_obj_create_ro_subobj_32label(void)
{
uint8_t class_type = 1;
uint32_t label = 0xeeffaabb;
@@ -856,7 +857,7 @@ void test_pcep_obj_create_ro_subobj_32label()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_asn()
+void test_pcep_obj_create_ro_subobj_asn(void)
{
uint16_t asn = 0x0102;
@@ -871,7 +872,7 @@ void test_pcep_obj_create_ro_subobj_asn()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_sr_nonai()
+void test_pcep_obj_create_ro_subobj_sr_nonai(void)
{
uint32_t sid = 0x01020304;
@@ -902,7 +903,7 @@ void test_pcep_obj_create_ro_subobj_sr_nonai()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_sr_ipv4_node()
+void test_pcep_obj_create_ro_subobj_sr_ipv4_node(void)
{
uint32_t sid = 0x01020304;
struct in_addr ipv4_node_id;
@@ -954,7 +955,7 @@ void test_pcep_obj_create_ro_subobj_sr_ipv4_node()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_sr_ipv6_node()
+void test_pcep_obj_create_ro_subobj_sr_ipv6_node(void)
{
uint32_t sid = 0x01020304;
struct in6_addr ipv6_node_id;
@@ -1007,7 +1008,7 @@ void test_pcep_obj_create_ro_subobj_sr_ipv6_node()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_sr_ipv4_adj()
+void test_pcep_obj_create_ro_subobj_sr_ipv4_adj(void)
{
struct in_addr local_ipv4;
struct in_addr remote_ipv4;
@@ -1072,7 +1073,7 @@ void test_pcep_obj_create_ro_subobj_sr_ipv4_adj()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_sr_ipv6_adj()
+void test_pcep_obj_create_ro_subobj_sr_ipv6_adj(void)
{
uint32_t sid = 0x01020304;
struct in6_addr local_ipv6;
@@ -1147,7 +1148,7 @@ void test_pcep_obj_create_ro_subobj_sr_ipv6_adj()
pcep_obj_free_object((struct pcep_object_header *)ro);
}
-void test_pcep_obj_create_ro_subobj_sr_unnumbered_ipv4_adj()
+void test_pcep_obj_create_ro_subobj_sr_unnumbered_ipv4_adj(void)
{
uint32_t sid = 0x01020304;
uint32_t local_node_id = 0x11223344;
@@ -1208,7 +1209,7 @@ void test_pcep_obj_create_ro_subobj_sr_unnumbered_ipv4_adj()
/* TODO Test draft07 types */
}
-void test_pcep_obj_create_ro_subobj_sr_linklocal_ipv6_adj()
+void test_pcep_obj_create_ro_subobj_sr_linklocal_ipv6_adj(void)
{
uint32_t sid = 0x01020304;
uint32_t local_if_id = 0x11002200;
diff --git a/pceplib/test/pcep_msg_tlvs_test.c b/pceplib/test/pcep_msg_tlvs_test.c
index 3ead269a6..292f1292b 100644
--- a/pceplib/test/pcep_msg_tlvs_test.c
+++ b/pceplib/test/pcep_msg_tlvs_test.c
@@ -55,23 +55,23 @@ int pcep_tlvs_test_suite_teardown(void)
return 0;
}
-void reset_tlv_buffer()
+void reset_tlv_buffer(void)
{
memset(tlv_buf, 0, 2000);
}
-void pcep_tlvs_test_setup()
+void pcep_tlvs_test_setup(void)
{
versioning = create_default_pcep_versioning();
reset_tlv_buffer();
}
-void pcep_tlvs_test_teardown()
+void pcep_tlvs_test_teardown(void)
{
destroy_pcep_versioning(versioning);
}
-void test_pcep_tlv_create_stateful_pce_capability()
+void test_pcep_tlv_create_stateful_pce_capability(void)
{
struct pcep_object_tlv_stateful_pce_capability *tlv =
pcep_tlv_create_stateful_pce_capability(true, true, true, true,
@@ -96,7 +96,7 @@ void test_pcep_tlv_create_stateful_pce_capability()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_speaker_entity_id()
+void test_pcep_tlv_create_speaker_entity_id(void)
{
struct pcep_object_tlv_speaker_entity_identifier *tlv =
pcep_tlv_create_speaker_entity_id(NULL);
@@ -130,7 +130,7 @@ void test_pcep_tlv_create_speaker_entity_id()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_lsp_db_version()
+void test_pcep_tlv_create_lsp_db_version(void)
{
uint64_t lsp_db_version = 0xf005ba11ba5eba11;
struct pcep_object_tlv_lsp_db_version *tlv =
@@ -148,7 +148,7 @@ void test_pcep_tlv_create_lsp_db_version()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_path_setup_type()
+void test_pcep_tlv_create_path_setup_type(void)
{
uint8_t pst = 0x89;
@@ -166,7 +166,7 @@ void test_pcep_tlv_create_path_setup_type()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_path_setup_type_capability()
+void test_pcep_tlv_create_path_setup_type_capability(void)
{
/* The sub_tlv list is optional */
@@ -274,7 +274,7 @@ void test_pcep_tlv_create_path_setup_type_capability()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_sr_pce_capability()
+void test_pcep_tlv_create_sr_pce_capability(void)
{
struct pcep_object_tlv_sr_pce_capability *tlv =
pcep_tlv_create_sr_pce_capability(true, true, 8);
@@ -294,7 +294,7 @@ void test_pcep_tlv_create_sr_pce_capability()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_symbolic_path_name()
+void test_pcep_tlv_create_symbolic_path_name(void)
{
/* char *symbolic_path_name, uint16_t symbolic_path_name_length); */
char path_name[16] = "Some Path Name";
@@ -336,7 +336,7 @@ void test_pcep_tlv_create_symbolic_path_name()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_ipv4_lsp_identifiers()
+void test_pcep_tlv_create_ipv4_lsp_identifiers(void)
{
struct in_addr sender_ip, endpoint_ip;
uint16_t lsp_id = 7;
@@ -397,7 +397,7 @@ void test_pcep_tlv_create_ipv4_lsp_identifiers()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_ipv6_lsp_identifiers()
+void test_pcep_tlv_create_ipv6_lsp_identifiers(void)
{
struct in6_addr sender_ip, endpoint_ip;
uint16_t lsp_id = 3;
@@ -444,7 +444,8 @@ void test_pcep_tlv_create_ipv6_lsp_identifiers()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_srpag_pol_id_ipv4()
+
+void test_pcep_tlv_create_srpag_pol_id_ipv4(void)
{
uint32_t color = 1;
struct in_addr src;
@@ -474,7 +475,8 @@ void test_pcep_tlv_create_srpag_pol_id_ipv4()
pceplib_free(PCEPLIB_MESSAGES, dec_hdr);
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_srpag_pol_id_ipv6()
+
+void test_pcep_tlv_create_srpag_pol_id_ipv6(void)
{
uint32_t color = 1;
@@ -504,7 +506,7 @@ void test_pcep_tlv_create_srpag_pol_id_ipv6()
pceplib_free(PCEPLIB_MESSAGES, dec_hdr);
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_srpag_pol_name()
+void test_pcep_tlv_create_srpag_pol_name(void)
{
const char *pol_name = "Some Pol Name";
@@ -524,7 +526,7 @@ void test_pcep_tlv_create_srpag_pol_name()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_srpag_cp_id()
+void test_pcep_tlv_create_srpag_cp_id(void)
{
// draft-ietf-spring-segment-routing-policy-06.pdf#2.3
// 10 PCEP, 20 BGP SR Policy, 30 Via Configuration
@@ -558,7 +560,7 @@ void test_pcep_tlv_create_srpag_cp_id()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_srpag_cp_pref()
+void test_pcep_tlv_create_srpag_cp_pref(void)
{
uint32_t preference_default = 100;
@@ -587,7 +589,8 @@ void test_pcep_tlv_create_srpag_cp_pref()
pceplib_free(PCEPLIB_MESSAGES, dec_hdr);
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_lsp_error_code()
+
+void test_pcep_tlv_create_lsp_error_code(void)
{
struct pcep_object_tlv_lsp_error_code *tlv =
pcep_tlv_create_lsp_error_code(
@@ -605,7 +608,7 @@ void test_pcep_tlv_create_lsp_error_code()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_rsvp_ipv4_error_spec()
+void test_pcep_tlv_create_rsvp_ipv4_error_spec(void)
{
struct in_addr error_node_ip;
inet_pton(AF_INET, "192.168.1.1", &error_node_ip);
@@ -629,7 +632,7 @@ void test_pcep_tlv_create_rsvp_ipv4_error_spec()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_rsvp_ipv6_error_spec()
+void test_pcep_tlv_create_rsvp_ipv6_error_spec(void)
{
struct in6_addr error_node_ip;
inet_pton(AF_INET6, "2001:db8::8a2e:370:7334", &error_node_ip);
@@ -653,7 +656,7 @@ void test_pcep_tlv_create_rsvp_ipv6_error_spec()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_nopath_vector()
+void test_pcep_tlv_create_nopath_vector(void)
{
uint32_t enterprise_number = 0x01020304;
uint32_t enterprise_specific_info = 0x05060708;
@@ -673,7 +676,7 @@ void test_pcep_tlv_create_nopath_vector()
pcep_obj_free_tlv(&tlv->header);
}
-void test_pcep_tlv_create_arbitrary()
+void test_pcep_tlv_create_arbitrary(void)
{
char data[16] = "Some Data";
uint16_t data_length = 9;
diff --git a/pceplib/test/pcep_msg_tools_test.c b/pceplib/test/pcep_msg_tools_test.c
index 858650ec8..440cccdad 100644
--- a/pceplib/test/pcep_msg_tools_test.c
+++ b/pceplib/test/pcep_msg_tools_test.c
@@ -199,7 +199,7 @@ static bool pcep_obj_has_tlv(struct pcep_object_header *obj_hdr)
return (obj_hdr->tlv_list->num_entries > 0);
}
-void test_pcep_msg_read_pcep_initiate()
+void test_pcep_msg_read_pcep_initiate(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -303,7 +303,7 @@ void test_pcep_msg_read_pcep_initiate()
}
-void test_pcep_msg_read_pcep_initiate2()
+void test_pcep_msg_read_pcep_initiate2(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -396,7 +396,7 @@ void test_pcep_msg_read_pcep_initiate2()
unlink(filename);
}
-void test_pcep_msg_read_pcep_open()
+void test_pcep_msg_read_pcep_open(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -444,7 +444,7 @@ void test_pcep_msg_read_pcep_open()
unlink(filename);
}
-void test_pcep_msg_read_pcep_update()
+void test_pcep_msg_read_pcep_update(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -530,7 +530,7 @@ void test_pcep_msg_read_pcep_update()
unlink(filename);
}
-void test_pcep_msg_read_pcep_open_initiate()
+void test_pcep_msg_read_pcep_open_initiate(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -563,7 +563,7 @@ void test_pcep_msg_read_pcep_open_initiate()
unlink(filename);
}
-void test_pcep_msg_read_pcep_open_cisco_pce()
+void test_pcep_msg_read_pcep_open_cisco_pce(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -630,7 +630,7 @@ void test_pcep_msg_read_pcep_open_cisco_pce()
unlink(filename);
}
-void test_pcep_msg_read_pcep_update_cisco_pce()
+void test_pcep_msg_read_pcep_update_cisco_pce(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -778,7 +778,7 @@ void test_pcep_msg_read_pcep_update_cisco_pce()
unlink(filename);
}
-void test_pcep_msg_read_pcep_report_cisco_pcc()
+void test_pcep_msg_read_pcep_report_cisco_pcc(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -943,7 +943,7 @@ void test_pcep_msg_read_pcep_report_cisco_pcc()
unlink(filename);
}
-void test_pcep_msg_read_pcep_initiate_cisco_pcc()
+void test_pcep_msg_read_pcep_initiate_cisco_pcc(void)
{
char filename[BASE_TMPFILE_SIZE];
@@ -1055,7 +1055,7 @@ void test_pcep_msg_read_pcep_initiate_cisco_pcc()
unlink(filename);
}
-void test_validate_message_header()
+void test_validate_message_header(void)
{
uint8_t pcep_message_invalid_version[] = {0x40, 0x01, 0x04, 0x00};
uint8_t pcep_message_invalid_flags[] = {0x22, 0x01, 0x04, 0x00};
@@ -1141,7 +1141,7 @@ struct pcep_message *create_message(uint8_t msg_type, uint8_t obj1_class,
return msg;
}
-void test_validate_message_objects()
+void test_validate_message_objects(void)
{
/* Valid Open message */
struct pcep_message *msg =
@@ -1203,7 +1203,7 @@ void test_validate_message_objects()
pcep_msg_free_message(msg);
}
-void test_validate_message_objects_invalid()
+void test_validate_message_objects_invalid(void)
{
/* unsupported message ID = 0
* {NO_OBJECT, NO_OBJECT, NO_OBJECT, NO_OBJECT} */
diff --git a/pceplib/test/pcep_pcc_api_test.c b/pceplib/test/pcep_pcc_api_test.c
index 904308fdf..768325a5a 100644
--- a/pceplib/test/pcep_pcc_api_test.c
+++ b/pceplib/test/pcep_pcc_api_test.c
@@ -34,13 +34,13 @@ extern const char UNKNOWN_EVENT_STR[];
* Test suite setup and teardown called before AND after the test suite.
*/
-int pcep_pcc_api_test_suite_setup()
+int pcep_pcc_api_test_suite_setup(void)
{
pceplib_memory_reset();
return 0;
}
-int pcep_pcc_api_test_suite_teardown()
+int pcep_pcc_api_test_suite_teardown(void)
{
printf("\n");
pceplib_memory_dump();
@@ -51,13 +51,13 @@ int pcep_pcc_api_test_suite_teardown()
* Test case setup and teardown called before AND after each test.
*/
-void pcep_pcc_api_test_setup()
+void pcep_pcc_api_test_setup(void)
{
setup_mock_socket_comm_info();
}
-void pcep_pcc_api_test_teardown()
+void pcep_pcc_api_test_teardown(void)
{
teardown_mock_socket_comm_info();
}
@@ -66,7 +66,7 @@ void pcep_pcc_api_test_teardown()
* Unit test cases
*/
-void test_initialize_pcc()
+void test_initialize_pcc(void)
{
CU_ASSERT_TRUE(initialize_pcc());
/* Give the PCC time to initialize */
@@ -74,7 +74,7 @@ void test_initialize_pcc()
CU_ASSERT_TRUE(destroy_pcc());
}
-void test_connect_pce()
+void test_connect_pce(void)
{
pcep_configuration *config = create_default_pcep_configuration();
struct hostent *host_info = gethostbyname("localhost");
@@ -109,7 +109,7 @@ void test_connect_pce()
destroy_pcc();
}
-void test_connect_pce_ipv6()
+void test_connect_pce_ipv6(void)
{
pcep_configuration *config = create_default_pcep_configuration();
struct in6_addr dest_address;
@@ -147,7 +147,7 @@ void test_connect_pce_ipv6()
destroy_pcc();
}
-void test_connect_pce_with_src_ip()
+void test_connect_pce_with_src_ip(void)
{
pcep_configuration *config = create_default_pcep_configuration();
struct hostent *host_info = gethostbyname("localhost");
@@ -180,7 +180,7 @@ void test_connect_pce_with_src_ip()
destroy_pcc();
}
-void test_disconnect_pce()
+void test_disconnect_pce(void)
{
pcep_configuration *config = create_default_pcep_configuration();
struct hostent *host_info = gethostbyname("localhost");
@@ -225,7 +225,7 @@ void test_disconnect_pce()
}
-void test_send_message()
+void test_send_message(void)
{
pcep_configuration *config = create_default_pcep_configuration();
struct hostent *host_info = gethostbyname("localhost");
@@ -249,7 +249,7 @@ void test_send_message()
destroy_pcc();
}
-void test_event_queue()
+void test_event_queue(void)
{
/* This initializes the event_queue */
CU_ASSERT_TRUE(initialize_pcc());
@@ -278,7 +278,7 @@ void test_event_queue()
CU_ASSERT_TRUE(destroy_pcc());
}
-void test_get_event_type_str()
+void test_get_event_type_str(void)
{
CU_ASSERT_EQUAL(strcmp(get_event_type_str(MESSAGE_RECEIVED),
MESSAGE_RECEIVED_STR),
diff --git a/pceplib/test/pcep_utils_counters_test.c b/pceplib/test/pcep_utils_counters_test.c
index f3bce5caf..7fa2f3ce6 100644
--- a/pceplib/test/pcep_utils_counters_test.c
+++ b/pceplib/test/pcep_utils_counters_test.c
@@ -22,7 +22,7 @@
#include "pcep_utils_counters_test.h"
-void test_create_counters_group()
+void test_create_counters_group(void)
{
const char group_name[] = "group";
uint16_t num_subgroups = 10;
@@ -45,7 +45,7 @@ void test_create_counters_group()
delete_counters_group(group);
}
-void test_create_counters_subgroup()
+void test_create_counters_subgroup(void)
{
const char subgroup_name[] = "subgroup";
uint16_t subgroup_id = 10;
@@ -77,7 +77,7 @@ void test_create_counters_subgroup()
delete_counters_subgroup(subgroup);
}
-void test_add_counters_subgroup()
+void test_add_counters_subgroup(void)
{
struct counters_group *group = create_counters_group("group", 1);
struct counters_subgroup *subgroup1 =
@@ -102,7 +102,7 @@ void test_add_counters_subgroup()
delete_counters_subgroup(subgroup2);
}
-void test_create_subgroup_counter()
+void test_create_subgroup_counter(void)
{
uint16_t counter_id = 1;
char counter_name[] = "my counter";
@@ -124,7 +124,7 @@ void test_create_subgroup_counter()
delete_counters_subgroup(subgroup);
}
-void test_delete_counters_group()
+void test_delete_counters_group(void)
{
struct counters_group *group = create_counters_group("group", 1);
@@ -132,7 +132,7 @@ void test_delete_counters_group()
CU_ASSERT_TRUE(delete_counters_group(group));
}
-void test_delete_counters_subgroup()
+void test_delete_counters_subgroup(void)
{
struct counters_subgroup *subgroup =
create_counters_subgroup("subgroup", 1, 1);
@@ -141,7 +141,7 @@ void test_delete_counters_subgroup()
CU_ASSERT_TRUE(delete_counters_subgroup(subgroup));
}
-void test_reset_group_counters()
+void test_reset_group_counters(void)
{
uint16_t subgroup_id = 1;
uint16_t counter_id = 1;
@@ -161,7 +161,7 @@ void test_reset_group_counters()
delete_counters_group(group);
}
-void test_reset_subgroup_counters()
+void test_reset_subgroup_counters(void)
{
uint16_t counter_id = 1;
struct counters_subgroup *subgroup =
@@ -178,7 +178,7 @@ void test_reset_subgroup_counters()
delete_counters_subgroup(subgroup);
}
-void test_increment_counter()
+void test_increment_counter(void)
{
uint16_t subgroup_id = 1;
uint16_t counter_id = 1;
@@ -201,7 +201,7 @@ void test_increment_counter()
delete_counters_group(group);
}
-void test_increment_subgroup_counter()
+void test_increment_subgroup_counter(void)
{
int counter_id = 1;
uint32_t counter_value = 100;
@@ -220,7 +220,7 @@ void test_increment_subgroup_counter()
delete_counters_subgroup(subgroup);
}
-void test_dump_counters_group_to_log()
+void test_dump_counters_group_to_log(void)
{
uint16_t subgroup_id = 1;
uint16_t counter_id = 1;
@@ -236,7 +236,7 @@ void test_dump_counters_group_to_log()
delete_counters_group(group);
}
-void test_dump_counters_subgroup_to_log()
+void test_dump_counters_subgroup_to_log(void)
{
uint16_t subgroup_id = 1;
uint16_t counter_id = 1;