test: Fix small compiler warnings in tests
This commit is contained in:
parent
9765aa5fd0
commit
a11d956714
|
@ -39,7 +39,7 @@ void test_wait(int time_ms, uvgrtp::media_stream* receiver)
|
|||
auto start = std::chrono::high_resolution_clock::now();
|
||||
frame = receiver->pull_frame(time_ms);
|
||||
int actual_difference =
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start).count();
|
||||
int(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start).count());
|
||||
|
||||
EXPECT_EQ(RTP_OK, rtp_errno);
|
||||
EXPECT_GE(actual_difference, time_ms);
|
||||
|
|
|
@ -17,7 +17,7 @@ enum Key_length { SRTP_128 = 128, SRTP_196 = 196, SRTP_256 = 256 };
|
|||
constexpr int SALT_SIZE = 112;
|
||||
constexpr int SALT_SIZE_BYTES = SALT_SIZE / 8;
|
||||
|
||||
void user_send_func(uint8_t *key, uint8_t salt[SALT_SIZE_BYTES], uint8_t key_size);
|
||||
void user_send_func(uint8_t *key, uint8_t salt[SALT_SIZE_BYTES], int key_size);
|
||||
void user_receive_func(uint8_t *key, uint8_t salt[SALT_SIZE_BYTES], uint8_t key_size);
|
||||
void zrtp_sender_func(uvgrtp::session* sender_session, int sender_port, int receiver_port, unsigned int flags, bool mux);
|
||||
void zrtp_receive_func(uvgrtp::session* receiver_session, int sender_port, int receiver_port, unsigned int flags, bool mux);
|
||||
|
@ -79,7 +79,7 @@ void test_user_key(Key_length len)
|
|||
delete[] key;
|
||||
}
|
||||
|
||||
void user_send_func(uint8_t* key, uint8_t salt[SALT_SIZE_BYTES], uint8_t key_size)
|
||||
void user_send_func(uint8_t* key, uint8_t salt[SALT_SIZE_BYTES], int key_size)
|
||||
{
|
||||
uvgrtp::context ctx;
|
||||
uvgrtp::session* sender_session = nullptr;
|
||||
|
@ -508,7 +508,7 @@ void zrtp_sender_func(uvgrtp::session* sender_session, int sender_port, int rece
|
|||
{
|
||||
int test_packets = 10;
|
||||
size_t packet_size = 1000;
|
||||
int packet_interval_ms = EXAMPLE_DURATION_S.count() * 1000 / test_packets;
|
||||
int packet_interval_ms = int(EXAMPLE_DURATION_S.count()) * 1000 / test_packets;
|
||||
|
||||
std::unique_ptr<uint8_t[]> test_frame = create_test_packet(RTP_FORMAT_GENERIC, 0, false, packet_size, RTP_NO_FLAGS);
|
||||
send_packets(std::move(test_frame), packet_size, sender_session, send, test_packets, packet_interval_ms, false, RTP_NO_FLAGS);
|
||||
|
|
|
@ -107,7 +107,7 @@ inline void send_packets(std::unique_ptr<uint8_t[]> test_packet, size_t size,
|
|||
<< " and interval " << packet_interval_ms << "ms" << std::endl;
|
||||
|
||||
std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now();
|
||||
for (unsigned int i = 0; i < packets; ++i)
|
||||
for (int i = 0; i < packets; ++i)
|
||||
{
|
||||
if (i % 60 == 0 && send_app)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue