From 289a452012aaa4a96bb6ccb0366bd46e25116dc6 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 2 Dec 2024 17:22:44 +0100 Subject: [PATCH] MT#57501 enumeration value 'NonHold' not handled in switch Add handling of the `ZeroedHold` and also handle the default action in the switch inside `CallLeg::updateLocalSdp()`. This eliminates the warning: CallLeg.cpp: In member function 'virtual void CallLeg::updateLocalSdp(AmSdp&)': CallLeg.cpp:2019:15: warning: enumeration value 'NonHold' not handled in switch [-Wswitch] 2019 | switch(hold_method_requested) | ^ CallLeg.cpp:2019:15: warning: enumeration value 'ZeroedHold' not handled in switch [-Wswitch] Change-Id: If0eebda2182b44aa591eb9aedd43481c94788b13 --- apps/sbc/CallLeg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/sbc/CallLeg.cpp b/apps/sbc/CallLeg.cpp index 969d5935..1e7a92bb 100644 --- a/apps/sbc/CallLeg.cpp +++ b/apps/sbc/CallLeg.cpp @@ -1860,6 +1860,11 @@ void CallLeg::updateLocalSdp(AmSdp &sdp) DBG("On hold has been previously requested and must be held further\n"); DBG("This SDP is prepared to be sent with the a=inactive\n"); break; + case ZeroedHold: + DBG("On hold has been previously requested, but will be not held further (zeroed hold)\n"); + break; + default: + break; /* do nothing, this handles the compiler's warning that NonHold is not mentioned in switch */ } } }