From 586a8028ebd6c269945bedf366e732f06e525920 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 20 May 2021 15:14:00 -0400 Subject: [PATCH] TT#111150 fix initialisers in test-transcode This eliminates some compiler warnings Change-Id: Id41742189d1a79e9d9b1bdf89a5269a9b3dcca7c --- t/test-transcode.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/t/test-transcode.c b/t/test-transcode.c index 5681728be..804fa5883 100644 --- a/t/test-transcode.c +++ b/t/test-transcode.c @@ -79,7 +79,7 @@ static void __start(const char *file, int line) { rtp_seq_ht = g_hash_table_new(g_direct_hash, g_direct_equal); ssrc_A = 1234; ssrc_B = 2345; - call = (struct call) {{0,},}; + ZERO(call); call.ssrc_hash = create_ssrc_hash_call(); call.tags = g_hash_table_new(g_str_hash, g_str_equal); str_init(&call.callid, "test-call"); @@ -129,8 +129,21 @@ static void __ht_set(GHashTable *h, char *x) { static void __sdp_pt_fmt(int num, str codec, int clockrate, str full_codec, str full_full, str fmt) { struct rtp_payload_type *pt = g_slice_alloc(sizeof(*pt)); - *pt = (struct rtp_payload_type) { num, full_codec, full_full, codec, - clockrate, STR_CONST_INIT(""), 1, fmt, {0,0}, {0,0}, 0, 0, NULL }; + *pt = (struct rtp_payload_type) { + .payload_type = num, + .encoding_with_params = full_codec, + .encoding_with_full_params = full_full, + .encoding = codec, + .clock_rate = clockrate, + .encoding_parameters = STR_CONST_INIT(""), + .channels = 1, + .format_parameters = fmt, + .codec_opts = STR_NULL, + .rtcp_fb = G_QUEUE_INIT, + .ptime = 0, + .bitrate = 0, + .codec_def = NULL, + }; g_queue_push_tail(&rtp_types, pt); }