On 06 Apr 2016, at 12:19, Neels Hofmeyr
<nhofmeyr(a)sysmocom.de> wrote:
On Tue, Mar 08, 2016 at 06:35:20PM +0100, Holger Hans Peter Freyther wrote:
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
[...]
> @@ -688,7 +661,6 @@ static int rtp_data_net(struct osmo_fd *fd, unsigned int what)
>
> switch(endp->type) {
It could be a good idea to add 'default:'
cases to above switch statements?
Now that we're removing some cases, would be good to catch callers still
passing one of the legacy cases (for whatever weird reasons)...
I believe in tools. typeof(endp->type) == enum mgcp_type. So if any value of that enum
is not handled, the compiler should (and did) warn.
holger