[ENet-discuss] [patch] get rid of "missing case" warnings
    Lucas Beyer 
    pompei2 at gmail.com
       
    Sat Jul 28 03:01:01 PDT 2012
    
    
  
Hi,
Clang warns about a couple missing "case"s, the following patch gets
rid of the warnings by adding a nop "default". It doens't change
behaviour, but I like my compilation to be clear of warnings, at least
on the default paranoia level.
the patch:
diff --git a/enet/protocol.c b/enet/protocol.c
index da64e91..8472a81 100644
--- a/enet/protocol.c
+++ b/enet/protocol.c
@@ -83,6 +83,8 @@ enet_protocol_dispatch_incoming_commands (ENetHost *
host, ENetEvent * event)
            }
            return 1;
+       default:
+           break;
        }
     }
@@ -863,6 +865,8 @@ enet_protocol_handle_acknowledge (ENetHost * host,
ENetEvent * event, ENetPeer *
            enet_list_empty (& peer -> sentReliableCommands))
          enet_peer_disconnect (peer, peer -> eventData);
        break;
+    default:
+       break;
     }
     return 0;
-- 
Best regards, Lucas
http://arkana-fts.org
    
    
More information about the ENet-discuss
mailing list