Commit 82d6fa3c authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Address Cpp check (CI)

parent 481e3d88
......@@ -96,15 +96,6 @@ void _Logger::trace(const char *format, ...) {
#endif
}
void _Logger::trace(const std::string &format, ...) {
#if TRACE_IS_ON
va_list args;
va_start( args, format );
log( _ltTrace, format.c_str(), args );
va_end( args );
#endif
}
void _Logger::debug(const char *format, ...) {
#if DEBUG_IS_ON
va_list args;
......@@ -114,15 +105,6 @@ void _Logger::debug(const char *format, ...) {
#endif
}
void _Logger::debug(const std::string &format, ...) {
#if DEBUG_IS_ON
va_list args;
va_start( args, format );
log( _ltDebug, format.c_str(), args );
va_end( args );
#endif
}
void _Logger::info(const char *format, ...) {
#if INFO_IS_ON
va_list args;
......@@ -132,15 +114,6 @@ void _Logger::info(const char *format, ...) {
#endif
}
void _Logger::info(const std::string &format, ...) {
#if INFO_IS_ON
va_list args;
va_start( args, format );
log( _ltInfo, format.c_str(), args );
va_end( args );
#endif
}
void _Logger::startup(const char *format, ...) {
va_list args;
va_start(args, format);
......@@ -148,13 +121,6 @@ void _Logger::startup(const char *format, ...) {
va_end(args);
}
void _Logger::startup(const std::string &format, ...) {
va_list args;
va_start(args, format);
log(_ltStartup, format.c_str(), args);
va_end(args);
}
void _Logger::warn(const char *format, ...) {
va_list args;
va_start(args, format);
......@@ -162,13 +128,6 @@ void _Logger::warn(const char *format, ...) {
va_end(args);
}
void _Logger::warn(const std::string &format, ...) {
va_list args;
va_start(args, format);
log(_ltWarn, format.c_str(), args);
va_end(args);
}
void _Logger::error(const char *format, ...) {
va_list args;
va_start(args, format);
......@@ -176,13 +135,6 @@ void _Logger::error(const char *format, ...) {
va_end(args);
}
void _Logger::error(const std::string &format, ...) {
va_list args;
va_start(args, format);
log(_ltError, format.c_str(), args);
va_end(args);
}
void _Logger::log(_LogType lt, const char *format, va_list &args) {
char buffer[2048];
......
......@@ -42,7 +42,7 @@ display_backtrace (
size = backtrace (array, 10);
strings = backtrace_symbols (array, size);
printf ("Obtained %zd stack frames.\n", size);
printf ("Obtained %zu stack frames.\n", size);
for (i = 0; i < size; i++)
printf ("%s\n", strings[i]);
......
......@@ -1191,6 +1191,7 @@ pfcp_msg::pfcp_msg(const pfcp_session_modification_response& pfcp_ies) : pfcp_ms
//------------------------------------------------------------------------------
pfcp_msg::pfcp_msg(const pfcp_session_deletion_request& pfcp_ies) : pfcp_msg_header() {
ies = {};
remote_port = 0;
set_message_type(PFCP_SESSION_DELETION_REQUEST);
// NO IEs !
}
......
......@@ -4009,6 +4009,7 @@ public:
}
//--------
explicit pfcp_urr_id_ie(const pfcp_tlv& t) : pfcp_ie(t) {
urr_id = 0;
};
//--------
void to_core_type(pfcp::urr_id_t& b) {
......@@ -4155,6 +4156,11 @@ public:
}
//--------
explicit pfcp_outer_header_creation_ie(const pfcp_tlv& t) : pfcp_ie(t) {
outer_header_creation_description = {};
teid = {};
ipv4_address = {};
ipv6_address = {};
port_number = {};
};
//--------
void to_core_type(pfcp::outer_header_creation_t& b) {
......@@ -4750,6 +4756,7 @@ public:
}
//--------
explicit pfcp_outer_header_removal_ie(const pfcp_tlv& t) : pfcp_ie(t) {
outer_header_removal_description = 0;
};
//--------
void to_core_type(pfcp::outer_header_removal_t& b) {
......@@ -5335,6 +5342,7 @@ public:
}
//--------
explicit pfcp_far_id_ie(const pfcp_tlv& t) : pfcp_ie(t) {
far_id = 0;
};
//--------
void to_core_type(pfcp::far_id_t& b) {
......@@ -5380,6 +5388,7 @@ public:
}
//--------
explicit pfcp_qer_id_ie(const pfcp_tlv& t) : pfcp_ie(t) {
qer_id = 0;
};
//--------
void to_core_type(pfcp::qer_id_t& b) {
......@@ -5918,6 +5927,7 @@ public:
}
//--------
explicit pfcp_user_plane_inactivity_timer_ie(const pfcp_tlv& t) : pfcp_ie(t) {
user_plane_inactivity_timer = 0;
};
//--------
void to_core_type(pfcp::user_plane_inactivity_timer_t& b) {
......
......@@ -286,6 +286,12 @@ class smf_config {
local_configuration = false;
num_session_management_subscription = 0;
test_upf_cfg = {};
for (int i = 0; i < SMF_NUM_SESSION_MANAGEMENT_SUBSCRIPTION_MAX; i++) {
session_management_subscription[i] = {};
}
sbi_http2_port = 0;
}
;
......
......@@ -1795,6 +1795,8 @@ void smf_context::handle_pdu_session_update_sm_context_request(
smf_app_inst->trigger_http_response(
http_status_code_e::HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR,
smreq->pid, N11_SESSION_UPDATE_SM_CONTEXT_RESPONSE);
free_wrapper((void**) &qos_flow_description);
return;
}
......
......@@ -79,6 +79,7 @@ class smf_qos_flow {
far_id_dl = { };
released = false;
qos_profile = { };
cause_value = 0;
}
/*
......
......@@ -702,6 +702,7 @@ bool smf_n1_n2::create_n2_sm_information(pdu_session_msg &msg,
it->first);
if (qos_flows.empty()) {
free_wrapper((void**) &ngap_IEs);
return false;
}
//TODO: support only 1 qos flow
......
......@@ -85,6 +85,7 @@ class pfcp_association {
num_retries_timer_heartbeat = 0;
trxn_id_heartbeat = 0;
timer_association = ITTI_INVALID_TIMER_ID;
is_restore_sessions_pending = false;
}
pfcp_association(const pfcp::node_id_t &ni, pfcp::recovery_time_stamp_t &rts,
pfcp::up_function_features_s &uff)
......
......@@ -21,6 +21,7 @@ namespace model {
AccessType::AccessType()
{
m_value = eAccessType::AccessType_3GPP_ACCESS;
}
AccessType::~AccessType()
......
......@@ -77,6 +77,7 @@ public:
udp_server(const struct in6_addr& address, const uint16_t port_num)
: app_(nullptr), port_(port_num)
{
recv_buffer_[0] = 0;
socket_ = create_socket (address, port_);
if (socket_ > 0) {
Logger::udp().debug( "udp_server::udp_server(%s:%d)", conv::toString(address).c_str(), port_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment