From nobody Sun May 5 10:41:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584038458; cv=none; d=zohomail.com; s=zohoarc; b=lPyf6saad/XZ5NynV7oUYnkIeCcael5zW5yvoKp8CTgff2l1p0f0FVvXOF2YjTZJyL82b5ZsPSoQY4FPDcID6cXvodvJTkInVg2Ejws6BA7zhLm/8X6d/RAIT+C48o90BJseBRXF83xh2uBBfOV1mOYMaC9vVN52vwwADgJ4Ibc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584038458; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=0oaCVA7a7cexyKkNg1fi5EhV/M3VZCoBQJmhEQt9NIM=; b=UNB5snz3gfdZG3YtPyz/cQjekmUeLFA/1ftLDH8xrs4IkK4m79MNIEpAAhtfgTVV7TTdVNcWY86pqkNp20UFc+onEeHV9Fu9cb7YzFtckd8ogui8L/uperV7vJlwY3FNWMk26JcUyHS/GGLqto0vnhtYqrdIxDDPzc8wJkpiqC4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1584038458277748.1342203149258; Thu, 12 Mar 2020 11:40:58 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-239-YG-704LsPdqpF6vKCPuWZA-1; Thu, 12 Mar 2020 14:40:54 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CCE4613F6; Thu, 12 Mar 2020 18:40:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90A8660BEC; Thu, 12 Mar 2020 18:40:48 +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 F353E85EC3; Thu, 12 Mar 2020 18:40:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02CIedp9001827 for ; Thu, 12 Mar 2020 14:40:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4549760C88; Thu, 12 Mar 2020 18:40:39 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-64.ams2.redhat.com [10.36.112.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 663C860BF1; Thu, 12 Mar 2020 18:40:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584038457; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0oaCVA7a7cexyKkNg1fi5EhV/M3VZCoBQJmhEQt9NIM=; b=UZBY/0xtukAO0RbToRujaAnJW7070R0mBnEVqwrg4UzvIanJvz8T5Y24uNA3h+V5BbRqda Q+0lcNffRFu/Lj4xFr0qC2l9HsSnjoftJr66/fv8ncpoKXd0+QIWBINlwU7SqAhLN9y2xv m7Io2SJi/ezgom0qNf1W1YS5iLE55io= X-MC-Unique: YG-704LsPdqpF6vKCPuWZA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] util: ensure min/maj are initialized in virGetDeviceID Date: Thu, 12 Mar 2020 18:40:33 +0000 Message-Id: <20200312184033.961421-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The stub impl of virGetDeviceID just returns ENOSYS and does not initialize the min/maj output parameters. This lead to a false positive warning on mingw about possible use of uninitialized variables. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: J=C3=A1n Tomko --- src/util/virutil.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index f77ee05dbf..ddd8805101 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -1407,9 +1407,10 @@ virGetDeviceID(const char *path, int *maj, int *min) #else int virGetDeviceID(const char *path G_GNUC_UNUSED, - int *maj G_GNUC_UNUSED, - int *min G_GNUC_UNUSED) + int *maj, + int *min) { + *maj =3D *min =3D 0; return -ENOSYS; } #endif --=20 2.24.1