From nobody Thu May 2 07:15:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532726278983490.26550218099305; Fri, 27 Jul 2018 14:17:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67C3C308403E; Fri, 27 Jul 2018 21:17:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C06EA5D6B4; Fri, 27 Jul 2018 21:17:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5625818037ED; Fri, 27 Jul 2018 21:17:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6RLHonB021135 for ; Fri, 27 Jul 2018 17:17:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id B6711379B; Fri, 27 Jul 2018 21:17:50 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEE18612A8 for ; Fri, 27 Jul 2018 21:17:48 +0000 (UTC) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9D79308212B for ; Fri, 27 Jul 2018 21:17:47 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id a132-v6so4209862qkg.3 for ; Fri, 27 Jul 2018 14:17:47 -0700 (PDT) Received: from localhost.localdomain ([187.104.182.63]) by smtp.gmail.com with ESMTPSA id o68-v6sm2976086qkf.9.2018.07.27.14.17.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 14:17:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=7G8chzhIN+RmRPigD6pIqr5CCOScSCxLrj3FqR5WQTQ=; b=mspoH0hZc4mUcWfEUIV62ebwlbrrghqB7JOtmjFowphMZcgVUCT3ycEZ86YR1kZVSJ /XtOMYd9+Mcq1ijq3fKCo5tzldFRtS/lIh84y241UbjwZgcjmBWdTitqUMqXbmHNJKHK k5HduUgWG5fyInx1v230LdPbf7/+MQdtPm7mTauEa34m1GDd3NLOpIiwROdFUmrw1gVQ VEVDQiWFyTVUPDcxc3HgyFRFrBirNcYIGvPg9HTy6Q4TqyJ+24Vv+m1alRQOqDVmmNll WWRmcRtaY16kjNHOEgBjObAE1/kqQPANyw94BL9i8QMlZv5ji7h0ui0wP8Op86Gql4H3 VtKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=7G8chzhIN+RmRPigD6pIqr5CCOScSCxLrj3FqR5WQTQ=; b=g7ZzjUH3sMR63S5xjqD1qsxISL//kgKIAqhXPp/BiFQT1ZHVk0eyA0T2FcaIu9szxd PlFYW13WP8vTZvbQuhYCjaEXgdMMlPiE2BniHErcUfmm79pOlpgggcwVbSlnOSZRHeij 5z5peFSUMAZVfZU9IUK3berH++0jdOUe7YTJpZCbVzDUTuDT0yPqw5zWOaaGIFDmv7Sn rxQ+hsc42gZNMH+7zt0NZ3b39j1LfDBpp0wB9vZWQbs+1JAQrnZj8ZlPbkjY7l+OZUv+ ayrRMUDAg92SxeagfUotWF/eJ1iNgHe28JY8ezn5WqihX9bovAdYL0peAe4SCUDikrrq pfeg== X-Gm-Message-State: AOUpUlHjLmxfixiOZbtyRd+TimDFQeorbVYtH7goAQDNJejcL8l/F9gG s0eyg1wyMD8mTrteUw3VwRKr0IMj X-Google-Smtp-Source: AAOMgpdyr8zl6l7f5DEa9p9jf9FPz9pqlqTLzLUFThfQ5hRU4iqdIgQ3yLmvsG/YEg0RGeYmof7Hqg== X-Received: by 2002:a37:8d87:: with SMTP id p129-v6mr7232859qkd.4.1532726266701; Fri, 27 Jul 2018 14:17:46 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 27 Jul 2018 18:17:34 -0300 Message-Id: <20180727211734.20579-1-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 27 Jul 2018 21:17:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 27 Jul 2018 21:17:47 +0000 (UTC) for IP:'209.85.220.195' DOMAIN:'mail-qk0-f195.google.com' HELO:'mail-qk0-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.13 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.220.195 mail-qk0-f195.google.com 209.85.220.195 mail-qk0-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.42 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2] util: clang is failing to compile due to unused variables. 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 27 Jul 2018 21:17:57 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" After some recent patches, clang is throwing some errors related to unused variables. This is not happening when we use GCC with -Werror enabled. Only clang reports this warning. make[3]: Entering directory '/home/julio/Desktop/virt/libvirt/src' CC util/libvirt_util_la-virscsivhost.lo CC util/libvirt_util_la-virusb.lo CC util/libvirt_util_la-virmdev.lo util/virmdev.c:373:36: error: unused variable 'ret' [-Werror,-Wunused-varia= ble] VIR_AUTOPTR(virMediatedDevice) ret =3D virMediatedDeviceListSteal(list,= dev); ^ 1 error generated. Makefile:11579: recipe for target 'util/libvirt_util_la-virmdev.lo' failed make[3]: *** [util/libvirt_util_la-virmdev.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... util/virscsivhost.c:112:37: error: unused variable 'tmp' [-Werror,-Wunused-= variable] VIR_AUTOPTR(virSCSIVHostDevice) tmp =3D virSCSIVHostDeviceListSteal(lis= t, dev); ^ 1 error generated. Makefile:11411: recipe for target 'util/libvirt_util_la-virscsivhost.lo' fa= iled make[3]: *** [util/libvirt_util_la-virscsivhost.lo] Error 1 util/virusb.c:511:31: error: unused variable 'ret' [-Werror,-Wunused-variab= le] VIR_AUTOPTR(virUSBDevice) ret =3D virUSBDeviceListSteal(list, dev); Signed-off-by: Julio Faracco --- src/util/virmdev.c | 2 +- src/util/virscsivhost.c | 2 +- src/util/virusb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virmdev.c b/src/util/virmdev.c index 4050835cc1..4492fd673e 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -370,7 +370,7 @@ void virMediatedDeviceListDel(virMediatedDeviceListPtr list, virMediatedDevicePtr dev) { - VIR_AUTOPTR(virMediatedDevice) ret =3D virMediatedDeviceListSteal(list= , dev); + virMediatedDeviceListSteal(list, dev); } =20 =20 diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index 280d0dc2fd..1a069e67ff 100644 --- a/src/util/virscsivhost.c +++ b/src/util/virscsivhost.c @@ -109,7 +109,7 @@ void virSCSIVHostDeviceListDel(virSCSIVHostDeviceListPtr list, virSCSIVHostDevicePtr dev) { - VIR_AUTOPTR(virSCSIVHostDevice) tmp =3D virSCSIVHostDeviceListSteal(li= st, dev); + virSCSIVHostDeviceListSteal(list, dev); } =20 =20 diff --git a/src/util/virusb.c b/src/util/virusb.c index 609d54836f..d14b7623cc 100644 --- a/src/util/virusb.c +++ b/src/util/virusb.c @@ -508,7 +508,7 @@ void virUSBDeviceListDel(virUSBDeviceListPtr list, virUSBDevicePtr dev) { - VIR_AUTOPTR(virUSBDevice) ret =3D virUSBDeviceListSteal(list, dev); + virUSBDeviceListSteal(list, dev); } =20 virUSBDevicePtr --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list