[libvirt] [PATCH] events: Remove ATTRIBUTE_NONNULL for virObjectEventStateQueue[Remote]

John Ferlan posted 1 patch 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180615194951.7578-1-jferlan@redhat.com
Test syntax-check passed
src/conf/object_event.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH] events: Remove ATTRIBUTE_NONNULL for virObjectEventStateQueue[Remote]
Posted by John Ferlan 5 years, 9 months ago
Commit aad3a0b5f altered virObjectEventStateQueueRemote to move
the "if (!event) return" call added in the previous commit 031eb8f6
to virObjectEventStateQueue. Neither commit altered the function
prototype which used ATTRIBUTE_NONNULL(2).

This caused Coverity build problems. Since @event is now checked,
just remove the ATTRIBUTE_NONNULL check from both prototypes.

Signed-off-by: John Ferlan <jferlan@redhat.com>
---
 src/conf/object_event.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

 Although a Coverity build breaker, that doesn't affect everyone so
 I'll wait for R-By or ACK for push.


diff --git a/src/conf/object_event.h b/src/conf/object_event.h
index 133f7ed914..70e9579e81 100644
--- a/src/conf/object_event.h
+++ b/src/conf/object_event.h
@@ -62,13 +62,13 @@ typedef void (*virConnectObjectEventGenericCallback)(virConnectPtr conn,
 void
 virObjectEventStateQueue(virObjectEventStatePtr state,
                          virObjectEventPtr event)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+    ATTRIBUTE_NONNULL(1);
 
 void
 virObjectEventStateQueueRemote(virObjectEventStatePtr state,
                                virObjectEventPtr event,
                                int remoteID)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+    ATTRIBUTE_NONNULL(1);
 
 int
 virObjectEventStateDeregisterID(virConnectPtr conn,
-- 
2.14.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] events: Remove ATTRIBUTE_NONNULL for virObjectEventStateQueue[Remote]
Posted by Ján Tomko 5 years, 9 months ago
On Fri, Jun 15, 2018 at 03:49:51PM -0400, John Ferlan wrote:
>Commit aad3a0b5f altered virObjectEventStateQueueRemote to move
>the "if (!event) return" call added in the previous commit 031eb8f6
>to virObjectEventStateQueue. Neither commit altered the function
>prototype which used ATTRIBUTE_NONNULL(2).
>
>This caused Coverity build problems. Since @event is now checked,
>just remove the ATTRIBUTE_NONNULL check from both prototypes.
>
>Signed-off-by: John Ferlan <jferlan@redhat.com>
>---
> src/conf/object_event.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Although a Coverity build breaker, that doesn't affect everyone so
> I'll wait for R-By or ACK for push.
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

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