mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 13:08:08 +00:00
Add LINPHONE_NO_BREAK macro
This macro tells GCC that a 'break' statement has been deliberately omitted in a switch block.
This commit is contained in:
parent
3a8fd1ba01
commit
41a1f556e1
6 changed files with 21 additions and 3 deletions
|
|
@ -569,10 +569,10 @@ static void process_call_accepted(LinphoneCore *lc, LinphoneCall *call, SalOp *o
|
|||
switch (call->state){
|
||||
case LinphoneCallResuming:
|
||||
linphone_core_notify_display_status(lc,_("Call resumed."));
|
||||
/*intentionally no break*/
|
||||
LINPHONE_NO_BREAK; /*intentionally no break*/
|
||||
case LinphoneCallConnected:
|
||||
if (call->referer) linphone_core_notify_refer_state(lc,call->referer,call);
|
||||
/*intentionally no break*/
|
||||
LINPHONE_NO_BREAK; /*intentionally no break*/
|
||||
case LinphoneCallUpdating:
|
||||
case LinphoneCallUpdatedByRemote:
|
||||
if (!sal_media_description_has_dir(call->localdesc, SalStreamInactive) &&
|
||||
|
|
@ -741,7 +741,7 @@ static void call_updated(LinphoneCore *lc, LinphoneCall *call, SalOp *op, bool_t
|
|||
case LinphoneCallResuming:
|
||||
sal_error_info_set(&sei,SalReasonInternalError, "SIP", 0, NULL, NULL);
|
||||
sal_call_decline_with_error_info(call->op, &sei,NULL);
|
||||
/*no break*/
|
||||
LINPHONE_NO_BREAK; /*no break*/
|
||||
case LinphoneCallIdle:
|
||||
case LinphoneCallOutgoingInit:
|
||||
case LinphoneCallEnd:
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){
|
|||
break;
|
||||
case LinphoneStatusVacation:
|
||||
str=_("Vacation");
|
||||
break;
|
||||
default:
|
||||
str=_("Unknown status");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2540,6 +2540,7 @@ static void setZrtpCryptoTypesParameters(MSZrtpParams *params, LinphoneCore *lc)
|
|||
break;
|
||||
case MS_AES_CM_256_SHA1_80:
|
||||
ms_warning("Deprecated crypto suite MS_AES_CM_256_SHA1_80, use MS_AES_256_SHA1_80 instead");
|
||||
LINPHONE_NO_BREAK;
|
||||
case MS_AES_256_SHA1_80:
|
||||
params->ciphers[params->ciphersCount++] = MS_ZRTP_CIPHER_AES3;
|
||||
params->authTags[params->authTagsCount++] = MS_ZRTP_AUTHTAG_HS80;
|
||||
|
|
@ -3797,6 +3798,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, LinphoneCallState nex
|
|||
if (linphone_core_get_remote_ringback_tone(lc)){
|
||||
call->playing_ringbacktone = TRUE;
|
||||
}
|
||||
LINPHONE_NO_BREAK;
|
||||
case LinphoneCallOutgoingEarlyMedia:
|
||||
if (!call->params->real_early_media){
|
||||
call->all_muted = TRUE;
|
||||
|
|
|
|||
|
|
@ -460,12 +460,16 @@ void linphone_core_set_log_level(OrtpLogLevel loglevel) {
|
|||
case ORTP_TRACE:
|
||||
case ORTP_DEBUG:
|
||||
mask |= ORTP_DEBUG;
|
||||
LINPHONE_NO_BREAK;
|
||||
case ORTP_MESSAGE:
|
||||
mask |= ORTP_MESSAGE;
|
||||
LINPHONE_NO_BREAK;
|
||||
case ORTP_WARNING:
|
||||
mask |= ORTP_WARNING;
|
||||
LINPHONE_NO_BREAK;
|
||||
case ORTP_ERROR:
|
||||
mask |= ORTP_ERROR;
|
||||
LINPHONE_NO_BREAK;
|
||||
case ORTP_FATAL:
|
||||
mask |= ORTP_FATAL;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1417,6 +1417,7 @@ static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call
|
|||
case LinphoneCallPausing:
|
||||
linphone_gtk_enable_hold_button(call,TRUE,FALSE);
|
||||
linphone_gtk_call_update_tab_header(call,FALSE);
|
||||
LINPHONE_NO_BREAK;
|
||||
case LinphoneCallPausedByRemote:
|
||||
linphone_gtk_in_call_view_set_paused(call);
|
||||
linphone_gtk_call_update_tab_header(call,TRUE);
|
||||
|
|
|
|||
|
|
@ -48,5 +48,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define LINPHONE_DEPRECATED MS2_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* Macro telling GCC that a 'break' statement has been deliberately omitted
|
||||
* in switch block */
|
||||
#ifndef LINPHONE_NO_BREAK
|
||||
#ifdef __GNUC__
|
||||
#define LINPHONE_NO_BREAK __attribute__((fallthrough))
|
||||
#else
|
||||
#define LINPHONE_NO_BREAK
|
||||
#endif // __GNUC__
|
||||
#endif // LINPHONE_NO_BREAK
|
||||
|
||||
|
||||
#endif /* LINPHONE_DEFS_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue