MT#55283 flags-flags parsing: semicolon only for the last

Add a semicolon only for the last switch statement
going in a row.

Fixes this Coverity Scan detected defect:

*** CID 1621493:  Control flow issues  (MISSING_BREAK)
/daemon/call_interfaces.c: 1063 in call_ng_flags_flags()
1057                            out->allow_no_codec_media = 1;
1058                            break;
1059                    case CSH_LOOKUP("allow-transcoding"):
1060                    case CSH_LOOKUP("allow transcoding"):
1061                            out->allow_transcoding = 1;
1062                            break;
>>>     CID 1621493:  Control flow issues  (MISSING_BREAK)
>>>     The case for value "15" is not terminated by a "break" statement.
1063                    case CSH_LOOKUP("always-transcode"):;
1064                    case CSH_LOOKUP("always transcode"):;
1065                            static const str str_all = STR_CONST("all");
1066                            call_ng_flags_esc_str_list((str *) &str_all, 0, &out->codec_accept);
1067                            break;
1068                    case CSH_LOOKUP("asymmetric"):

Change-Id: I4d6bc56d8149acd2d0d69f122e420c5a8c6ae2e1
pull/1931/head
Donat Zenichev 3 months ago
parent 5c899c4817
commit 2a43d9ab4a

@ -1060,7 +1060,7 @@ void call_ng_flags_flags(str *s, unsigned int idx, helper_arg arg) {
case CSH_LOOKUP("allow transcoding"):
out->allow_transcoding = 1;
break;
case CSH_LOOKUP("always-transcode"):;
case CSH_LOOKUP("always-transcode"):
case CSH_LOOKUP("always transcode"):;
static const str str_all = STR_CONST("all");
call_ng_flags_esc_str_list((str *) &str_all, 0, &out->codec_accept);

Loading…
Cancel
Save