From patchwork Mon Feb 20 11:12:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 655073 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1333527wrc; Mon, 20 Feb 2023 03:12:58 -0800 (PST) X-Google-Smtp-Source: AK7set/sm3fqsXVhXnsQwtBEFHyvsSFuazfGs9FNEwB61kxPJlgOH3Fsw6APUNAf50Nw50kRsmq4 X-Received: by 2002:ac8:5914:0:b0:3ba:265d:6793 with SMTP id 20-20020ac85914000000b003ba265d6793mr13576451qty.42.1676891578387; Mon, 20 Feb 2023 03:12:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676891578; cv=none; d=google.com; s=arc-20160816; b=QG1s3GvU3BhX62QK+uxKQvywicn60MoLPUgCUSszy73cK6YHpWU6XDMs5lONzN0HO0 RX5vr++FCQcHku3W+5flTH2AFZQ+QRqi0QwfaFXfzv6ToIAHcWmigGfma+TESZiPwGee jA/PtNxeKu7gqjA6cZpZDeNUFDPx345UqQjmGw0i04inJLzg6l4mXaC9KrnYevU33Rm+ 7Ihx/a4+I+lOL0tIRbibmFHOg0LpvXK/zLZVfKUGyUszHJIffOMu/ZpRACPH74l95lJk j75gkghQwr1YeEJ4IGbmfs0s1ezAozCsCIwiOoDRJ5EZb95eG5wIIFXjaA57NztSMZbf Km2A== 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=qhdhruQaX9ctshKuZBp4/i0kd4dyMcwaC4CV4/GojikM6m1AKKpkgoFhyBo730YXdg jLzOjNEyJhFeJbmFNQDHdKMe/EuI3jYq5aZLm/DAadCYhJ1P+8pVrPx5B+2RlvI3hiub 6pTpgJlQn+ElVSb8xMYj+faD1jku3LvvWWa0Gvl5FtntD0R12RQT61xKMc2A/U97/cP5 iegSEeCcmpfb14JsgFWLv//yJ41Xfe90ExZvwq7VaEzhNa2gM8lBtHRQbcb26vuuSneA e49hEmtefEgKx8qqp0yex9zyGozASbJX29rR9qRX7tfsotRSdF8AuPAUKPJU5Qz87spH WikQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="YiqsXv5/"; 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 m10-20020a05620a290a00b007107e3bb636si10424425qkp.191.2023.02.20.03.12.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 03:12:58 -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="YiqsXv5/"; 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 1pU45w-0004WD-Gi; Mon, 20 Feb 2023 06:12:33 -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 1pU45n-0004VX-5f for qemu-devel@nongnu.org; Mon, 20 Feb 2023 06:12:23 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU45k-0006SM-DJ for qemu-devel@nongnu.org; Mon, 20 Feb 2023 06:12:22 -0500 Received: by mail-wr1-x42f.google.com with SMTP id v3so663707wrp.2 for ; Mon, 20 Feb 2023 03:12:20 -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=YiqsXv5/8fCXXrxCbjyyVZnYGN4SrEUp4FmVu87iPXcLVF/g2LekwYjF4aFm0sPiN3 srpgwSuCAJG+8SAQHRJUm/olRTr+pNAU+SKkGiPvkGJ4uhN+hPWzrcF0oZ2fu7Gaktlt RjuhFeaMJO5tKSnQ0pS7IF8LCHiSc7aPXUNDDtkrEcCdEBp+YOLGsJGSr9G7RaMFX/jo mOMUp2PVNTaRJWyzGbfj4gPOMPGws/grh71LCsxkOWjQ8a9urPEs6x28kTEQkKPW4Wjq olJ1FhSpaOke9Ro0xpnRJztoBOUMRk0gFemcAAPdp7Mlw/FmnNcCkvJ9uJ0GePKWQPA8 9lgw== 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=MInuthzZzS3DbgRdI/uiPgW0l9HbWTV44dhBnkpnSGadFQgPEESzr0Zg5JvUsR6KON dl30OmkV83BR/kFQZgn3+c9C79uM6W2qCREnk9yXhQMf6khnXU1oD2DFKzrIHuSbS15d CKoE3lEWN37BZxS6sKSrzIk+KzFHErlhdFGmURq0tiIUFpjBoPGgxfo/iotCL9j9bpq9 VuzRMXAM4lDFQL8//gpVupkzNzl1QRW4IkUcKGLL+ZfwVCTz0jqBszj0M1yNTQSTtgUa qDla8t/DhFGl8xbk3LX9fZgkmPlBsOM3dY3Y8zUTW/yQV3U5j9Y2rB90eZPp+eYPP4DS 6DVA== X-Gm-Message-State: AO0yUKUWQob+6evKQoDZU/2Ua5pU5XFEk762oKICRH3wihoevcdq9wE4 TAeOeh0lS3ph7/9LOonVVHMdEowAMJCpmK5NNqU= X-Received: by 2002:a5d:4b07:0:b0:2c5:4480:b590 with SMTP id v7-20020a5d4b07000000b002c54480b590mr898506wrq.54.1676891538569; Mon, 20 Feb 2023 03:12:18 -0800 (PST) Received: from volterra.localdomain ([2a01:e0a:5cc:caa0:c49d:d14a:e6ed:555a]) by smtp.gmail.com with ESMTPSA id q2-20020adff942000000b002c573778432sm5046656wrr.102.2023.02.20.03.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 03:12:18 -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, peter.maydell@linaro.org, Pierrick Bouvier Subject: [PATCH v3 3/4] qga/vss-win32: fix warning for clang++-15 Date: Mon, 20 Feb 2023 12:12:14 +0100 Message-Id: <20230220111215.27471-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230220111215.27471-1-pierrick.bouvier@linaro.org> References: <20230220111215.27471-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-wr1-x42f.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-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 Reviewed-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé --- 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;