From patchwork Wed Aug 3 21:37:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 73227 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1071730qga; Wed, 3 Aug 2016 14:43:16 -0700 (PDT) X-Received: by 10.55.189.65 with SMTP id n62mr2668625qkf.129.1470260596334; Wed, 03 Aug 2016 14:43:16 -0700 (PDT) Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com. [209.132.183.39]) by mx.google.com with ESMTPS id x129si3507507qkx.199.2016.08.03.14.43.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 14:43:16 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u73Lbg2K049007; Wed, 3 Aug 2016 17:37:43 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u73LbfDS007157 for ; Wed, 3 Aug 2016 17:37:41 -0400 Received: from [10.3.116.46] (ovpn-116-46.phx2.redhat.com [10.3.116.46]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u73Lbe8Q002660; Wed, 3 Aug 2016 17:37:41 -0400 To: John Ferlan , Jovanka Gulicoska , libvir-list@redhat.com References: <1469707377-18488-1-git-send-email-jovanka.gulicoska@gmail.com> <1469707377-18488-3-git-send-email-jovanka.gulicoska@gmail.com> From: Cole Robinson Message-ID: <66ae190f-827e-0f5d-b4d9-1692dea5507e@redhat.com> Date: Wed, 3 Aug 2016 17:37:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-loop: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2 2/8] conf: add node_device_event handling X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com On 08/03/2016 09:40 AM, John Ferlan wrote: > > > 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) > I think just dropping it is fine? The code was updated to handle uuid=NULL > It gets even worse in the function and needs to be resolved before the > "next" release. > I can't parse this sentence... are there additional issues? Thanks, Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/conf/object_event_private.h b/src/conf/object_event_private.h index 92c25d4..27b461f 100644 --- a/src/conf/object_event_private.h +++ b/src/conf/object_event_private.h @@ -106,6 +106,6 @@ virObjectEventNew(virClassPtr klass, const unsigned char *uuid, const char *key) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5) - ATTRIBUTE_NONNULL(6) ATTRIBUTE_NONNULL(7); + ATTRIBUTE_NONNULL(7); #endif