Ensure all enum cases are listed in switch statements.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/rpc/virnetclient.c | 2 ++
src/rpc/virnetclientprogram.c | 1 +
src/rpc/virnetserverprogram.c | 4 ++++
3 files changed, 7 insertions(+)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 8aeacf8774..0c8d58c32c 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -1287,6 +1287,8 @@ virNetClientCallDispatch(virNetClientPtr client)
case VIR_NET_STREAM_HOLE: /* Sparse stream protocol*/
return virNetClientCallDispatchStream(client);
+ case VIR_NET_CALL:
+ case VIR_NET_CALL_WITH_FDS:
default:
virReportError(VIR_ERR_RPC,
_("got unexpected RPC call prog %d vers %d proc %d type
%d"),
diff --git a/src/rpc/virnetclientprogram.c b/src/rpc/virnetclientprogram.c
index d81a055424..505b40fc4b 100644
--- a/src/rpc/virnetclientprogram.c
+++ b/src/rpc/virnetclientprogram.c
@@ -384,6 +384,7 @@ int virNetClientProgramCall(virNetClientProgramPtr prog,
virNetClientProgramDispatchError(prog, msg);
goto error;
+ case VIR_NET_CONTINUE:
default:
virReportError(VIR_ERR_RPC,
_("Unexpected message status %d"),
msg->header.status);
diff --git a/src/rpc/virnetserverprogram.c b/src/rpc/virnetserverprogram.c
index 557651ffbd..75b0052cdb 100644
--- a/src/rpc/virnetserverprogram.c
+++ b/src/rpc/virnetserverprogram.c
@@ -324,6 +324,10 @@ int virNetServerProgramDispatch(virNetServerProgramPtr prog,
ret = 0;
break;
+ case VIR_NET_REPLY:
+ case VIR_NET_REPLY_WITH_FDS:
+ case VIR_NET_MESSAGE:
+ case VIR_NET_STREAM_HOLE:
default:
virReportError(VIR_ERR_RPC,
_("Unexpected message type %u"),
--
2.14.3