[libvirt] [PATCH] storage: Fix broken storage_driver build

John Ferlan posted 1 patch 6 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20171124144553.11267-1-jferlan@redhat.com
src/storage/storage_driver.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[libvirt] [PATCH] storage: Fix broken storage_driver build
Posted by John Ferlan 6 years, 4 months ago
Commit id '5d5c732d7' had an incorrect assignment and was found
by travis build:

storage/storage_driver.c:1668:14: error: equality comparison with extraneous
      parentheses [-Werror,-Wparentheses-equality]
    if ((obj == virStoragePoolObjListSearch(&driver->pools,

         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: John Ferlan <jferlan@redhat.com>
---

 <sigh> Where are those damn pink ears.

 Pushed as a build breaker.

 src/storage/storage_driver.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index cb45052ef7..561ca36f90 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -1665,9 +1665,9 @@ storagePoolLookupByTargetPath(virConnectPtr conn,
         return NULL;
 
     storageDriverLock();
-    if ((obj == virStoragePoolObjListSearch(&driver->pools,
-                                            storagePoolLookupByTargetPathCallback,
-                                            path))) {
+    if ((obj = virStoragePoolObjListSearch(&driver->pools,
+                                           storagePoolLookupByTargetPathCallback,
+                                           path))) {
         def = virStoragePoolObjGetDef(obj);
         pool = virGetStoragePool(conn, def->name, def->uuid, NULL, NULL);
         virStoragePoolObjEndAPI(&obj);
-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] storage: Fix broken storage_driver build
Posted by Michal Privoznik 6 years, 4 months ago
On 11/24/2017 03:45 PM, John Ferlan wrote:
> Commit id '5d5c732d7' had an incorrect assignment and was found
> by travis build:
> 
> storage/storage_driver.c:1668:14: error: equality comparison with extraneous
>       parentheses [-Werror,-Wparentheses-equality]
>     if ((obj == virStoragePoolObjListSearch(&driver->pools,
> 
>          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: John Ferlan <jferlan@redhat.com>
> ---
> 

<friday>

>  <sigh> Where are those damn pink ears.

There's a git hook script that takes a picture with webcam on every git
commit [1]. We can set it up and be required to take a selfie when
committing fixes like this :-)

1: https://lolcommits.github.io/

</friday>

Michal

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