Re: [PATCH v2 2/8] conf: add node_device_event handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07/28/2016 08:02 AM, Jovanka Gulicoska wrote:
> Add node device event handling infrastructure to node_device_event.[ch]
> ---
>  src/Makefile.am              |   5 +
>  src/conf/node_device_event.c | 234 +++++++++++++++++++++++++++++++++++++++++++
>  src/conf/node_device_event.h |  59 +++++++++++
>  src/libvirt_private.syms     |   5 +
>  4 files changed, 303 insertions(+)
>  create mode 100644 src/conf/node_device_event.c
>  create mode 100644 src/conf/node_device_event.h
> 

[...]

> diff --git a/src/conf/node_device_event.c b/src/conf/node_device_event.c
> new file mode 100644
> index 0000000..61bc912

[...]

> +
> +/**
> + * virNodeDeviceEventLifecycleNew:
> + * @name: name of the node device object the event describes
> + * @type: type of lifecycle event
> + * @detail: more details about @type
> + *
> + * Create a new node device lifecycle event.
> + */
> +virObjectEventPtr
> +virNodeDeviceEventLifecycleNew(const char *name,
> +                               int type,
> +                               int detail)
> +{
> +    virNodeDeviceEventLifecyclePtr event;
> +
> +    if (virNodeDeviceEventsInitialize() < 0)
> +        return NULL;
> +
> +    if (!(event = virObjectEventNew(virNodeDeviceEventLifecycleClass,
> +                                    virNodeDeviceEventDispatchDefaultFunc,
> +                                    VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE,
> +                                    0, name, NULL, name)))
                                                ^^^^

This has caused a Coverity build failure since the prototype has:

ATTRIBUTE_NONNULL(6)

It gets even worse in the function and needs to be resolved before the
"next" release.

John

> +        return NULL;
> +
> +    event->type = type;
> +    event->detail = detail;
> +
> +    return (virObjectEventPtr)event;
> +}

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]