[Pkg-telepathy-commits] [libnice] 64/265: stun: Add missing switch cases

Simon McVittie smcv at debian.org
Wed May 14 12:04:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository libnice.

commit 3a4cd47b85c01ab8e07449fd6f9378ab2306b933
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Tue Dec 17 10:05:06 2013 +0000

    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.
---
 stun/tools/stund.c | 8 ++++++++
 stun/usages/ice.c  | 3 +++
 2 files changed, 11 insertions(+)

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;
   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git



More information about the Pkg-telepathy-commits mailing list