[PATCH] qemu_domain: Drop ATTRIBUTE_NONNULL() for non-existent arguments

Michal Privoznik posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/d177ccf126f4f4aca7a73263ac95152d1d7aea7a.1679491391.git.mprivozn@redhat.com
src/qemu/qemu_domain.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] qemu_domain: Drop ATTRIBUTE_NONNULL() for non-existent arguments
Posted by Michal Privoznik 1 year, 1 month ago
After cleanup done in v8.2.0-rc1~47 the
qemuDomainObjExitMonitor() and after v8.7.0-rc1~176 the
qemuDomainObjEnterMonitor() lost the @driver argument. But
corresponding ATTRIBUTE_NONNULL() annotation was not removed and
both functions are still annotated as ATTRIBUTE_NONNULL(2) even
though they accept just one argument (@obj).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_domain.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index c716e64ccc..eaa75de3e5 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -579,9 +579,9 @@ void qemuDomainEventFlush(int timer, void *opaque);
 qemuMonitor *qemuDomainGetMonitor(virDomainObj *vm)
     ATTRIBUTE_NONNULL(1);
 void qemuDomainObjEnterMonitor(virDomainObj *obj)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+    ATTRIBUTE_NONNULL(1);
 void qemuDomainObjExitMonitor(virDomainObj *obj)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+    ATTRIBUTE_NONNULL(1);
 int qemuDomainObjEnterMonitorAsync(virDomainObj *obj,
                                    virDomainAsyncJob asyncJob)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
-- 
2.39.2
Re: [PATCH] qemu_domain: Drop ATTRIBUTE_NONNULL() for non-existent arguments
Posted by Kristina Hanicova 1 year, 1 month ago
On Wed, Mar 22, 2023 at 2:59 PM Michal Privoznik <mprivozn@redhat.com>
wrote:

> After cleanup done in v8.2.0-rc1~47 the
> qemuDomainObjExitMonitor() and after v8.7.0-rc1~176 the
> qemuDomainObjEnterMonitor() lost the @driver argument. But
> corresponding ATTRIBUTE_NONNULL() annotation was not removed and
> both functions are still annotated as ATTRIBUTE_NONNULL(2) even
> though they accept just one argument (@obj).
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  src/qemu/qemu_domain.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Kristina Hanicova <khanicov@redhat.com>

Kristina