mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
rpc: handle missing switch enum cases
Ensure all enum cases are listed in switch statements. Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
7fef8e330d
commit
6c84533f04
@ -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"),
|
||||
|
@ -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);
|
||||
|
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user