From patchwork Mon Feb 13 16:13:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 653226 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2639227wrr; Mon, 13 Feb 2023 12:50:35 -0800 (PST) X-Google-Smtp-Source: AK7set9khvZrJxoNurSLtCz0ujtpmpy4K6WtSOtLHVDm1PRJZNmV058hy2mwzGYT4PVuVwpbBrNb X-Received: by 2002:ad4:5c45:0:b0:56e:9a34:4eaf with SMTP id a5-20020ad45c45000000b0056e9a344eafmr570654qva.36.1676321434894; Mon, 13 Feb 2023 12:50:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676321434; cv=none; d=google.com; s=arc-20160816; b=rMveTYl3T0EYc0yR2UwxChXWqvtOUlWBRiWHhVg7J67QkFdnukGqiFDI6L3E1m4jVn tP2Du4qlwjNjeg/vYQP342WlFYU1U4qFxMPR7mQ9pE2qq9ZrEGJzWmWVTNp9SQ1/hsu4 NJzRV2rGk/TZWPCJWeyGQdmmPRGormdjrmFLMEhgXGXgST6jF3qfhWyXKdZHIOLavdFC t1lURnv/4Uq6yHj+GKEWtblEPAhlHt8TQTB/04RWdApekoDtg2/ZslNsvUtIL/xJu4R9 /p9NXteGVs5Q62OvSlrLJbg/cDHoSatmQUyeLbLaQ3UfyCE7IqUAHJKFWmhhmXVPkHfb HR/g== 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:cc:to :from:dkim-signature; bh=oCtcRsma4Lb/eGzY1J2Zycrim3J1natcTOS1qZitV64=; b=CwqeZ21fqRedTBGvP/O7Lgzr+itd5luPycB8u5QmAedUrOox5drr/Z1fXTd7DepzSV 0g/Sr7MRlX7DbgJ7iXIS8A4ZcmydWXINIkCDUa9I0VlN4UFt8X96S7BUJLVnpFFTNxpm c8H7ecvULfT/lI/C4+lliqdMY93GOJK3XM//9gdww4hZkZliwsSDQK/XuG43f64/REkU RHrZuc8+Cte1DmR1yVJmPi1eywn/1xzOA1AuL1ISDTCYprNF+Tvly0jaGyjmD8bJKxAt 3yzNY0M5JNga56AVCGPkPXFpv9Cv/Hy38XV53NQuyRHGYXvt590Gkes5fcECnxtEIOMD 4fDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZhhgDXVN; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t8-20020a0cde08000000b0056bff80c91csi10264760qvk.379.2023.02.13.12.50.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Feb 2023 12:50:34 -0800 (PST) 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=@linaro.org header.s=google header.b=ZhhgDXVN; 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=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRfku-0000rb-Vg; Mon, 13 Feb 2023 15:48:56 -0500 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 1pRbT2-00083U-Iq for qemu-devel@nongnu.org; Mon, 13 Feb 2023 11:14:12 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRbT1-0005jy-2k for qemu-devel@nongnu.org; Mon, 13 Feb 2023 11:14:12 -0500 Received: by mail-wm1-x331.google.com with SMTP id j29-20020a05600c1c1d00b003dc52fed235so9448036wms.1 for ; Mon, 13 Feb 2023 08:14:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oCtcRsma4Lb/eGzY1J2Zycrim3J1natcTOS1qZitV64=; b=ZhhgDXVN7p55YgzqReoCQBHVWmTiH9uwZ4CAumPnALVEk3RTKDJluWi7l1P48y3X// 7K7xCMRrzhLYgiAMcDioXViq2Vt/za3+Gik6EKdwMYn+qsscJLpjyZTQKY6gdPAMFoKJ rna9pTHdd13UJkZoxmNZoXhD7gn86kftqtKmpbOX92hijF2cfoekec4V5dWg+aCdebHc xf6gB/NSjuREWh+j109sASh8uGWdwWgp9TX2O1RG2HuuU9xmysSAtdT9tgRcG7aNoiXe pn6VwhvReLzFGjUt7/C/PFVv8y3nPWK3XHp1X3E/du9nQ/B6CoS7xux1qJPEQ/ru5S+k iNeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oCtcRsma4Lb/eGzY1J2Zycrim3J1natcTOS1qZitV64=; b=XGEOLKA9uZFGcs9jBSBOZq0x4bTIHTGAT86dPVFXbm/7dgUm4jff4gSXx2cyF3yndc mboujcJKaZ69DNPAPdPNLvE7Qjn98vtf8GzJi5p/ohWnHsm3Pl+vvtA2dFispDAqyrq0 fpHFIwd2mlGXazdVmqftw0bO6UhTfIDY/6k/ifMxKfrAGrQuEn5QTBTtir2oYKEVPv68 m7tbgqYusk+gToIQv+SUIPrbFv8KzyNMA6w83BPCqRavDdHODT/TRcT6nWEzF7nIKcSv d3jonUoMFSrAvu7jyef0N3t6HHiCvVWO56W/pRRul7j6OI73PHiY5lv/AqikoQiEjEnK JxZw== X-Gm-Message-State: AO0yUKWaOqEMLq+IbvctbgugLHt5NYDFC9c9Lh5Txwd3CEc/fdwEboQM et97XN9Ke3KD8A20n8Y80ueBm4k+Jtuw+9UNt9s= X-Received: by 2002:a05:600c:4a9a:b0:3dc:5b48:ee5 with SMTP id b26-20020a05600c4a9a00b003dc5b480ee5mr19187770wmp.2.1676304848584; Mon, 13 Feb 2023 08:14:08 -0800 (PST) Received: from volterra.localdomain ([2a01:e0a:5cc:caa0:8df5:e191:f2b0:5825]) by smtp.gmail.com with ESMTPSA id t13-20020adfe44d000000b002c557f82e27sm3582882wrm.99.2023.02.13.08.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 08:14:08 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: sw@weilnetz.de, kkostiuk@redhat.com, clg@kaod.org, richard.henderson@linaro.org, alex.bennee@linaro.org, Pierrick Bouvier Subject: [PATCH 3/4] qga/vss-win32: fix warning for clang++-15 Date: Mon, 13 Feb 2023 17:13:51 +0100 Message-Id: <20230213161352.17199-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230213161352.17199-1-pierrick.bouvier@linaro.org> References: <20230213161352.17199-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=pierrick.bouvier@linaro.org; helo=mail-wm1-x331.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 13 Feb 2023 15:48:53 -0500 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 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 --- 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;