From patchwork Wed Mar 22 19:22:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Konstantin Kostiuk X-Patchwork-Id: 665911 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp323784wrt; Wed, 22 Mar 2023 12:23:10 -0700 (PDT) X-Google-Smtp-Source: AK7set/QquhueDSAwdDPHjvUcKAY+H7ipqheLWKLfEplZdN1NsngqxxjsYoBns2fbHOIIzqvLDsG X-Received: by 2002:ad4:5be9:0:b0:56e:f9a2:1aff with SMTP id k9-20020ad45be9000000b0056ef9a21affmr7752714qvc.35.1679512989956; Wed, 22 Mar 2023 12:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679512989; cv=none; d=google.com; s=arc-20160816; b=m+GJs4DPaMgNzjKE8UWdRDpHnricgjI2UFMkDpu3b7XhPK1NIEXr3Qq9DTQSm/SBAw pL36dTc47ksBKBzwthiKHlZSqVB8OpEewvV9G3GNWoc8aIF4iUly5j4L3OVkfMn6K8a6 tDQ2EG2Vkw1pD+PP/1YuJvyrGkq2qdUascV8rXRBADLjuWY/gWRGTGCxRVU6yU/LNNiR doAbSxSBbAPVU9/ehgeCnPRxYlwtreSN7bKqX2IOEdQi8YgjUS5TBn+bTL9C0fAd1jCv P3FpzqewT4AGULyUT4G/+GN8+p8yZ6QyyIGgoReTB1JX/7ECnvuk+vbaXFRvv16Fr4Nj X0fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=SZT0hXGHVjJ4UqburaB0t5f2HDg1dkedDmOy5ZOq5NQ=; b=iWB4mfLv+m00Zr5gtAI3HJMTCJPtxLGToBd7h33iitPGNT0oiJyd2PcY0IB5K0DGiv Xf0npGskz48HSx1q6zs2lEqgbIY+l8WYJZ8lycY7IhGW6RMOKggUia47UlY+Rmy4xrSG FwIq7z6vAMmaapt6rwSgx48zAqVAW/S8McEBICsyIiuM8N1b94ESNloel7sMJ4ayi6Bo c2S7X+rOGU7AKZGWgfGWnVKbx9KlmoAUrSTH7v8dSt3r5qrE74TmhJ7p4suZBsJsdjnY Bb/OAXIkaYJ3DxZWGeKqYsehrwdsGcqTLBiqy6QIuMsOLrYseFodRoQZGRbULvIbityw 2tVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AsNPf9B6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i7-20020a0cfd27000000b00571aaf9c066si10036850qvs.395.2023.03.22.12.23.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Mar 2023 12:23:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AsNPf9B6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pf42g-0006yG-Un; Wed, 22 Mar 2023 15:22:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf42W-0006wv-P5 for qemu-devel@nongnu.org; Wed, 22 Mar 2023 15:22:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf42U-0006s1-ES for qemu-devel@nongnu.org; Wed, 22 Mar 2023 15:22:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679512944; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=SZT0hXGHVjJ4UqburaB0t5f2HDg1dkedDmOy5ZOq5NQ=; b=AsNPf9B6f7AspVdN/J0V8k/Uyh8i3YkaG/v3Xpk8TNn8Fx4pOsKrBbmpe/ivQGlJflvVBt ik4RpsBW2DBwhDttlHP+smdwVSVJEEtOfiSzZydRJ66tPW0U9OcP9QlrLStBDIqNnJR5Cp NHM4XTNgpfcURxhLivBtKf2qzIOsQhM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-668-StFeIhgxPqecUUp7Ph0XMA-1; Wed, 22 Mar 2023 15:22:16 -0400 X-MC-Unique: StFeIhgxPqecUUp7Ph0XMA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE9BE2999B3D; Wed, 22 Mar 2023 19:22:15 +0000 (UTC) Received: from kostyanf14nb.redhat.com (unknown [10.45.224.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EFF5C40C83AC; Wed, 22 Mar 2023 19:22:14 +0000 (UTC) From: Konstantin Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Pierrick Bouvier Subject: [PULL 1/1] qga/vss-win32: fix warning for clang++-15 Date: Wed, 22 Mar 2023 21:22:11 +0200 Message-Id: <20230322192211.331226-2-kkostiuk@redhat.com> In-Reply-To: <20230322192211.331226-1-kkostiuk@redhat.com> References: <20230322192211.331226-1-kkostiuk@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reported when compiling with clang-windows-arm64. ../qga/vss-win32/install.cpp:537:9: error: variable 'hr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!(ControlService(service, SERVICE_CONTROL_STOP, NULL))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../qga/vss-win32/install.cpp:545:12: note: uninitialized use occurs here return hr; ^~ Signed-off-by: Pierrick Bouvier Fixes: 917ebcb170 ("qga-win: Fix QGA VSS Provider service stop failure") Reviewed-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Kostiantyn Kostiuk --- qga/vss-win32/install.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index b57508fbe0..b8087e5baa 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -518,7 +518,7 @@ namespace _com_util /* Stop QGA VSS provider service using Winsvc API */ STDAPI StopService(void) { - HRESULT hr; + HRESULT hr = S_OK; SC_HANDLE manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); SC_HANDLE service = NULL;