Remove some warnings

This commit is contained in:
Aaro Altonen 2019-07-23 08:19:35 +03:00
parent 37d8ee9f1a
commit 138d7e8271
4 changed files with 6 additions and 5 deletions

View File

@ -15,8 +15,8 @@
kvz_rtp::connection::connection(bool reader): kvz_rtp::connection::connection(bool reader):
config_(nullptr), config_(nullptr),
socket_(), socket_(),
reader_(reader), rtcp_(nullptr),
rtcp_(nullptr) reader_(reader)
{ {
rtp_sequence_ = generate_rand_32(); rtp_sequence_ = generate_rand_32();
rtp_ssrc_ = generate_rand_32(); rtp_ssrc_ = generate_rand_32();
@ -134,6 +134,8 @@ void kvz_rtp::connection::set_clock_rate(uint32_t clock_rate)
void kvz_rtp::connection::fill_rtp_header(uint8_t *buffer, uint32_t timestamp) void kvz_rtp::connection::fill_rtp_header(uint8_t *buffer, uint32_t timestamp)
{ {
(void)timestamp;
if (!buffer) if (!buffer)
return; return;

View File

@ -211,7 +211,6 @@ rtp_error_t kvz_rtp::frame_queue::enqueue_message(
rtp_error_t kvz_rtp::frame_queue::flush_queue(kvz_rtp::connection *conn) rtp_error_t kvz_rtp::frame_queue::flush_queue(kvz_rtp::connection *conn)
{ {
#ifdef __linux__ #ifdef __linux__
rtp_error_t ret = RTP_OK;
if (!conn || msg_ptr_ == 0 || hdr_ptr_ == 0 || chunk_ptr_ == 0) { if (!conn || msg_ptr_ == 0 || hdr_ptr_ == 0 || chunk_ptr_ == 0) {
LOG_ERROR("Cannot send 0 messages or messages containing 0 chunks!"); LOG_ERROR("Cannot send 0 messages or messages containing 0 chunks!");

View File

@ -253,7 +253,7 @@ void kvz_rtp::rtcp::init_participant_seq(uint32_t ssrc, uint16_t base_seq)
participants_[ssrc]->stats.base_seq = base_seq; participants_[ssrc]->stats.base_seq = base_seq;
participants_[ssrc]->stats.max_seq = base_seq; participants_[ssrc]->stats.max_seq = base_seq;
participants_[ssrc]->stats.bad_seq = RTP_SEQ_MOD + 1; participants_[ssrc]->stats.bad_seq = (uint16_t)RTP_SEQ_MOD + 1;
} }
rtp_error_t kvz_rtp::rtcp::update_participant_seq(uint32_t ssrc, uint16_t seq) rtp_error_t kvz_rtp::rtcp::update_participant_seq(uint32_t ssrc, uint16_t seq)

View File

@ -196,7 +196,7 @@ rtp_error_t kvz_rtp::socket::__sendtov(
header_.msg_hdr.msg_control = 0; header_.msg_hdr.msg_control = 0;
header_.msg_hdr.msg_controllen = 0; header_.msg_hdr.msg_controllen = 0;
if (sendmmsg(socket_, &header_, 1, 0) < 0) { if (sendmmsg(socket_, &header_, 1, flags) < 0) {
LOG_ERROR("Failed to send RTP frame: %s!", strerror(errno)); LOG_ERROR("Failed to send RTP frame: %s!", strerror(errno));
set_bytes(bytes_sent, -1); set_bytes(bytes_sent, -1);
return RTP_SEND_ERROR; return RTP_SEND_ERROR;