summaryrefslogtreecommitdiff
path: root/stun
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2013-12-17 10:05:06 +0000
committerOlivier Crête <olivier.crete@collabora.com>2014-01-31 01:48:57 -0500
commit3a4cd47b85c01ab8e07449fd6f9378ab2306b933 (patch)
treed02de4997a5adaf7a091d82eca67e727f9f6ebad /stun
parent56c5dced7bebcf4400a9c205efe18f1d1a923540 (diff)
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.
Diffstat (limited to 'stun')
-rw-r--r--stun/tools/stund.c8
-rw-r--r--stun/usages/ice.c3
2 files changed, 11 insertions, 0 deletions
diff --git a/stun/tools/stund.c b/stun/tools/stund.c
index 6a0b18d..e13295f 100644
--- a/stun/tools/stund.c
+++ b/stun/tools/stund.c
@@ -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))
diff --git a/stun/usages/ice.c b/stun/usages/ice.c
index 71aa847..02792ab 100644
--- a/stun/usages/ice.c
+++ b/stun/usages/ice.c
@@ -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;
}