[libvirt] [PATCH v2 01/10] nodedev: Make use of the compile-time missing enum in switch error

Pavel Hrdina phrdina at redhat.com
Fri Apr 21 11:44:21 UTC 2017


On Thu, Apr 20, 2017 at 03:05:51PM +0200, Erik Skultety wrote:
> So udevGetDeviceDetails was one those functions using an enum in a

s/one those/one of those/

> switch, but since it had a 'default' case, compiler didn't warn about an
> unhandled enum. Moreover, the error about an unsupported device type
> reported in the default case is unnecessary, since by the time we get
> there, udevGetDeviceType (which was called before) already made sure
> that any unrecognized device types had been handled properly.
> 
> Signed-off-by: Erik Skultety <eskultet at redhat.com>
> ---
>  src/node_device/node_device_udev.c | 45 +++++++++++++-------------------------
>  1 file changed, 15 insertions(+), 30 deletions(-)

ACK

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170421/a49e62d5/attachment-0001.sig>


More information about the libvir-list mailing list