[ENet-discuss] [patch] get rid of "missing case" warnings
Lee Salzman
lsalzman at gmail.com
Tue Jul 31 06:54:17 PDT 2012
Well, I shoved those in the 1.3.5 release. But eh, it's only a matter of time before the clang decides to invent new classes of warnings. :)
On 07/28/2012 01:01 PM, Lucas Beyer wrote:
> 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;
>
More information about the ENet-discuss
mailing list