Commit 3a4cd47b authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

stun: Add missing switch cases

This appeases GCC’s -Wswitch-enum warning, and makes it more obvious
that those enum cases have been explicitly considered, rather than just
forgotten about.

This introduces no functional changes.
parent 56c5dced
......@@ -229,6 +229,14 @@ static int dgram_process (int sock, StunAgent *oldagent, StunAgent *newagent)
&addr.addr, addr_len);
break;
case STUN_SHARED_SECRET:
case STUN_ALLOCATE:
case STUN_SEND:
case STUN_CONNECT:
case STUN_IND_SEND:
case STUN_IND_DATA:
case STUN_CREATEPERMISSION:
case STUN_CHANNELBIND:
default:
if (!stun_agent_init_error (agent, &response, buf, sizeof (buf),
&request, STUN_ERROR_BAD_REQUEST))
......
......@@ -347,6 +347,9 @@ failure:
case STUN_MESSAGE_RETURN_INVALID:
case STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS:
return STUN_USAGE_ICE_RETURN_INVALID_ADDRESS;
case STUN_MESSAGE_RETURN_SUCCESS:
assert (0); /* shouldn’t be reached */
case STUN_MESSAGE_RETURN_NOT_FOUND:
default:
return STUN_USAGE_ICE_RETURN_ERROR;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment