MT#55283 silence compiler warning

For some reason gcc 10.2.1 complains about this instance with

control_ng_flags_parser.c: In function ‘parse_transports’:
control_ng_flags_parser.c:299:2: warning: missing initializer for field ‘remainder’ of ‘rtpp_pos’ [-Wmissing-field-initializers]
  299 |  call_ng_main_flags(&dummy_parser, &STR_CONST("transport-protocol"), &(rtpp_pos) {.cur = STR(val)}, out);
      |  ^~~~~~~~~~~~~~~~~~
In file included from ./log.h:7,
                 from ../lib/obj.h:105,
                 from ../include/control_ng_flags_parser.h:7,
                 from control_ng_flags_parser.c:1:
../include/types.h:48:6: note: ‘remainder’ declared here
   48 |  str remainder;
      |      ^~~~~~~~~

but doesn't complain about other instances of the same usage. Oh well.
Make it shut up.

Change-Id: I6989e3c63b075b6c8f258a824557b767123dc0f6
pull/1889/head
Richard Fuchs 12 months ago
parent 27ea6b1381
commit 02ef6b05fe

@ -296,7 +296,8 @@ static void parse_transports(unsigned int transport, sdp_ng_flags *out)
const char * val = transports[transport & 0x007];
if (!val)
return;
call_ng_main_flags(&dummy_parser, &STR_CONST("transport-protocol"), &(rtpp_pos) {.cur = STR(val)}, out);
call_ng_main_flags(&dummy_parser, &STR_CONST("transport-protocol"),
&(rtpp_pos) {.cur = STR(val), .remainder = STR_NULL}, out);
}

Loading…
Cancel
Save