From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858238; cv=none; d=zohomail.com; s=zohoarc; b=TqvrM16/75pa2ymcVDAzM7ntBkdU3ImwM24JnrDoB7pyC7FIPr6HNVnX0Rdm8ybDMjBHLHKbThab+dYjCmlng2WbanT8ae9QdPIF1vJwtxa8yKbpUdKSuAC6r74+XjFCJuXAD2RpgvLQF1fbsscfJHyA/cEJQiWVBfFwrxalW+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858238; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uhM4mUe4SOwd5IXKZy3s8JqZaDqEwhiZJ//8HTUJpqA=; b=G5Dv9D+cuPADzRbwrZ9GVG2FmcugOUye9LZajK6PzGbCsIv9vYFkEi+h5h3W0UUEqUSimT8L6lZOjKXeh7seBVIAjg9X26VVgOXpDjqUcjeG0UF8VsplScskeOjbbT33fpAPCR0vr+63B/ErGrsiWRHU9Kpv+bV1quxcLnMPJ0A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858238722496.21246944902714; Wed, 2 Oct 2024 01:37:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svur3-00014n-NN; Wed, 02 Oct 2024 04:37:05 -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 1svur2-00014V-RF for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svuqz-0005e6-80 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:03 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-615-qpHbL0ZdPm6Y9aSyYcvWBw-1; Wed, 02 Oct 2024 04:36:56 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C07691955D5B; Wed, 2 Oct 2024 08:36:55 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8055819560AD; Wed, 2 Oct 2024 08:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uhM4mUe4SOwd5IXKZy3s8JqZaDqEwhiZJ//8HTUJpqA=; b=c0fNmk4adGRfdTYsA1Iij/HjL4+PPbiDfVSeox2ip9AgSkr1d23vApj0WkoLvT17e+pjbV 2qMex2FCRp0/QlQ3mVXx8A/v8Vyuiq/6Z5JmhzKzrPWf0Ek2uPMnIeB8xj45avHrGlL4Fu xWSvvmOP1tyr8GpjKT1He6rT3nI+eWk= X-MC-Unique: qpHbL0ZdPm6Y9aSyYcvWBw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Hajnoczi , Kevin Wolf Subject: [PULL 01/22] util/coroutine: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:24 +0400 Message-ID: <20241002083646.2893078-2-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858240367116600 From: Marc-Andr=C3=A9 Lureau ../util/qemu-coroutine.c:150:8: error: =E2=80=98batch=E2=80=99 may be used = uninitialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- util/qemu-coroutine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index eb4eebefdf..64d6264fc7 100644 --- a/util/qemu-coroutine.c +++ b/util/qemu-coroutine.c @@ -136,7 +136,7 @@ static Coroutine *coroutine_pool_get_local(void) static void coroutine_pool_refill_local(void) { CoroutinePool *local_pool =3D get_ptr_local_pool(); - CoroutinePoolBatch *batch; + CoroutinePoolBatch *batch =3D NULL; =20 WITH_QEMU_LOCK_GUARD(&global_pool_lock) { batch =3D QSLIST_FIRST(&global_pool); --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858258; cv=none; d=zohomail.com; s=zohoarc; b=L5fdO6wgV+EywkXwhM/PPSIL4+sF1ibe0IiUHTQhDFRRh4vgKB4TQzcz0XO019U8BnJboKpVbA066YK8PfrcNAfolyXYnlBbyxq7KM4qHSuimJqBMA/a2bdA+9QlS+SQev9mMzutOFOkocoyoobQsnq+F8FItzF/LuJismhtfq0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858258; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VEGksA9KrAjdYdb0jvqfGMpZ0DaihQHvTeMRO5FF8lk=; b=lWR/Le0Rz13xjg99QQGWldbQoCq7Rn5fezuVcZ0KmXsIPRUHEcuikdTkvr2oKY24IT9uKI+R+kmDTjWdfp1jANKjPmWx/qKwysHz0ZiWM2WBKHR4JEEzxqRAgqn4kSMbxJedYDluXXFK3qoUTqIXDGfyyaqXnf1Ol8bR1o6Cn8Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858258181299.54518043591213; Wed, 2 Oct 2024 01:37:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svur5-00015j-UJ; Wed, 02 Oct 2024 04:37:07 -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 1svur4-00015N-By for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svur3-0005ef-1l for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:06 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-687-qUXiNrP8N0uo2_z0BlOHlg-1; Wed, 02 Oct 2024 04:37:01 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 46F4C1955D80; Wed, 2 Oct 2024 08:37:00 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0EA1919560A2; Wed, 2 Oct 2024 08:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VEGksA9KrAjdYdb0jvqfGMpZ0DaihQHvTeMRO5FF8lk=; b=ihn2R/08XC5ooKow+ripN/uwZ2Z7eso+eFrPq+hru/fp68WKSX1M9Srag2vdOK6wwhmXic U7q2dFoz0lzDp30WOg5jFqmXW7Lmvng7eWiV57YoQTHyDbHVp8Lipiiwu6TwBis2Nk0AaS vrIq0o6YywEkkCvJrIMLnMe8ZVPmNRo= X-MC-Unique: qUXiNrP8N0uo2_z0BlOHlg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Subject: [PULL 02/22] util/timer: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:25 +0400 Message-ID: <20241002083646.2893078-3-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858258509116600 From: Marc-Andr=C3=A9 Lureau ../util/qemu-timer.c:198:24: error: =E2=80=98expire_time=E2=80=99 may be us= ed uninitialized [-Werror=3Dmaybe-uninitialized] ../util/qemu-timer.c:476:8: error: =E2=80=98rearm=E2=80=99 may be used unin= itialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Manos Pitsidianakis --- util/qemu-timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 6b1533bc2a..d5e33490fc 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -182,7 +182,7 @@ bool qemu_clock_has_timers(QEMUClockType type) =20 bool timerlist_expired(QEMUTimerList *timer_list) { - int64_t expire_time; + int64_t expire_time =3D 0; =20 if (!qatomic_read(&timer_list->active_timers)) { return false; @@ -212,7 +212,7 @@ bool qemu_clock_expired(QEMUClockType type) int64_t timerlist_deadline_ns(QEMUTimerList *timer_list) { int64_t delta; - int64_t expire_time; + int64_t expire_time =3D 0; =20 if (!qatomic_read(&timer_list->active_timers)) { return -1; @@ -461,7 +461,7 @@ void timer_mod_ns(QEMUTimer *ts, int64_t expire_time) void timer_mod_anticipate_ns(QEMUTimer *ts, int64_t expire_time) { QEMUTimerList *timer_list =3D ts->timer_list; - bool rearm; + bool rearm =3D false; =20 WITH_QEMU_LOCK_GUARD(&timer_list->active_timers_lock) { if (ts->expire_time =3D=3D -1 || ts->expire_time > expire_time) { --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858278; cv=none; d=zohomail.com; s=zohoarc; b=FqqU11dtivm3Vv/DF9PM8JFsprJYWEdVAVwkxjfKUlmOcaQTaINWw7hvKeHzuoqtYMmwpRvASA591CVdWdj42wIvmZe+7ryYNtxRUIB0LWOZ2+sEGO7Fsv0R/UX5iqsIJK/SLL7ww9bYTllkz0A6W4jXAyJIj5J7zcwx19KIUSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858278; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SqNBt+U5WXfjV8ANAT5H4qqOi6cJpF903jrqT6hq03c=; b=OAaUhlVSTrm5AT+t2xeNEtYjkASuCX42fOftsVS3EOcb+FMw9wV/Dxpl60aAFXfMGBnT70cJWbNgpUs4c5+MOTXwQVnvDDm2uDmixTiiURKssTdYxvhoS9cPVvb9m/V3M9P6GSXw3tF/zEov9hLWg3+NoI8nN6CwOmEUKZUWyPI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858278378711.3898080584244; Wed, 2 Oct 2024 01:37:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svur8-00016A-TL; Wed, 02 Oct 2024 04:37:10 -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 1svur7-000162-I4 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svur6-0005fL-5k for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:09 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-199-5zRzRiuKOguxnYfjXHqIBg-1; Wed, 02 Oct 2024 04:37:05 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AE851195423A; Wed, 2 Oct 2024 08:37:04 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 937391956056; Wed, 2 Oct 2024 08:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SqNBt+U5WXfjV8ANAT5H4qqOi6cJpF903jrqT6hq03c=; b=KVHnxoNMi0dpKHuJ4YDrq+GlBLKJxohtwiESeAMJ6coD9xDTGfjDTXi9iKdlVabr6hv94y MfmZG1lGCd0sZWD0LNzpsaexDtNvb5E3hS0eAyXnoDsaT3Dy8gXGQliWcng+oOADHbEfd5 jykWC9A9BZODZDVjXThxn3mWc7vbBnU= X-MC-Unique: 5zRzRiuKOguxnYfjXHqIBg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 03/22] hw/qxl: fix -Werror=maybe-uninitialized false-positives Date: Wed, 2 Oct 2024 12:36:26 +0400 Message-ID: <20241002083646.2893078-4-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858278565116600 From: Marc-Andr=C3=A9 Lureau ../hw/display/qxl.c:1352:5: error: =E2=80=98pci_region=E2=80=99 may be used= uninitialized [-Werror=3Dmaybe-uninitialized] ../hw/display/qxl.c:1365:22: error: =E2=80=98pci_start=E2=80=99 may be used= uninitialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Manos Pitsidianakis --- hw/display/qxl.c | 4 ++-- roms/openbios | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 3c2b5182ca..0c4b1c9bf2 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1301,8 +1301,8 @@ static int qxl_add_memslot(PCIQXLDevice *d, uint32_t = slot_id, uint64_t delta, }; uint64_t guest_start; uint64_t guest_end; - int pci_region; - pcibus_t pci_start; + int pci_region =3D -1; + pcibus_t pci_start =3D PCI_BAR_UNMAPPED; pcibus_t pci_end; MemoryRegion *mr; intptr_t virt_start; diff --git a/roms/openbios b/roms/openbios index c3a19c1e54..af97fd7af5 160000 --- a/roms/openbios +++ b/roms/openbios @@ -1 +1 @@ -Subproject commit c3a19c1e54977a53027d6232050e1e3e39a98a1b +Subproject commit af97fd7af5e7c18f591a7b987291d3db4ffb28b5 --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858413; cv=none; d=zohomail.com; s=zohoarc; b=DiiOsM4DVojGRrOF8jW5jWfmVmBxn8btIrHL5qs05MPP9aMbRdtGSZzWcov4o/u7SOf2p6uMWhcQX20fZ2Oq5OgvF/u8idDcJo6z8OT8UUacRfdAAR5neQng/88mb+Yl2kYtm8t5yzm0kXIgJwI4JtsocruNF7pKltbLMvNfnd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858413; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JGOe2Dnp1wJG1ukQSWN3HzZdCz5Em4HGNnPdjOs5MqI=; b=LFY8pbup/LVWLDlSvT2u4knReupfwirfyRRBZxjqcJqdOP5gtDgj3BgkUoZBS738EAoK/495pCAGAlDEqiK15bA3gkpaK6VnBs6asseJzkITpiRmVtWugK9jAV0k1iG8tQzzXnt/QllNSFe02LKFvIvHp1x2xOkwhjNQF3wJhd4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858413784163.8350725496772; Wed, 2 Oct 2024 01:40:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurI-0001F0-MU; Wed, 02 Oct 2024 04:37:20 -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 1svurF-0001BF-L2 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:17 -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 1svurE-0005fj-BN for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:17 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-500-8ZZuWUHRMWSDpMYtl0cqIw-1; Wed, 02 Oct 2024 04:37:10 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7F5F61955F33; Wed, 2 Oct 2024 08:37:09 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C4A33000197; Wed, 2 Oct 2024 08:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JGOe2Dnp1wJG1ukQSWN3HzZdCz5Em4HGNnPdjOs5MqI=; b=KMeOg6MzmGRayjOWbg39amTf7d9MU8RsIEjhiVREWP+7hxFmvwWDgHMsP997Laf1Os6h+G eyRiIZ6pRXKNJn6A01M79QEqExjMtsbX/iNMe7hCL2Rj/9Tb2z2Puv9RSFXlUfUGJoHuGd 2Z3M0JUmmoYwmX43D8as/qrqoZWxu3g= X-MC-Unique: 8ZZuWUHRMWSDpMYtl0cqIw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Eric Blake , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org (open list:Network Block Dev...) Subject: [PULL 04/22] nbd: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:27 +0400 Message-ID: <20241002083646.2893078-5-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858415096116600 From: Marc-Andr=C3=A9 Lureau ../nbd/client-connection.c:419:8: error: =E2=80=98wait_co=E2=80=99 may be u= sed uninitialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eric Blake --- nbd/client-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbd/client-connection.c b/nbd/client-connection.c index f9da67c87e..b11e266807 100644 --- a/nbd/client-connection.c +++ b/nbd/client-connection.c @@ -410,7 +410,7 @@ nbd_co_establish_connection(NBDClientConnection *conn, = NBDExportInfo *info, */ void nbd_co_establish_connection_cancel(NBDClientConnection *conn) { - Coroutine *wait_co; + Coroutine *wait_co =3D NULL; =20 WITH_QEMU_LOCK_GUARD(&conn->mutex) { wait_co =3D g_steal_pointer(&conn->wait_co); --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858373; cv=none; d=zohomail.com; s=zohoarc; b=CGI7Jo2JuJy6LeESpTfrIGr2i2c8oXoaUWjJBKwoHne28uD6HD5iYtObrnGvRDWwkRQsUfMW7uweeGyJFtXp99IVrCREaaz+KSMUaNn7KmrMtsEm37ySAgNYT7Idc/esDxqMTu8nw3grR1Qmu3oEDOU0ryQtkVOf+QG69T1zBUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858373; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=foZ7CWBn2Ic+QnOUkHIFPNTfKtf84lHEG4IMdgmc9Bo=; b=Y+ryaF55QOUWY/DsqQltipa6BFm+lPxca1gFaawmV168FwklEmlQqtwA37fCOlgxIr1OgxBM0tj0Bbuv/WSwOdV1h0aKpWl8OWMuBremPjXZrLGAVroGwIy6uSCgQrICNIiff5fSztaD8PbrdwxF3oAFu7hcC/QLHen/kqyVnjs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858372999952.2296990340676; Wed, 2 Oct 2024 01:39:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurK-0001GY-F0; Wed, 02 Oct 2024 04:37:22 -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 1svurJ-0001GC-Ak for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:21 -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 1svurF-0005fy-Qo for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:21 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-686-98YytAXvMZmHTuRmqAt5KA-1; Wed, 02 Oct 2024 04:37:15 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3C10E1954228; Wed, 2 Oct 2024 08:37:14 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D91541955E8F; Wed, 2 Oct 2024 08:37:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=foZ7CWBn2Ic+QnOUkHIFPNTfKtf84lHEG4IMdgmc9Bo=; b=N3kaCO6cEqRgFz+32/0NS1GnpWTmZIwKqdh2byxH8oiKPajn69o/ejGGrpdm+MXEBm2Q1O y7bswJyFcsgk23LxnbQEiiBvWJReDSUzljApFtuhnnDwTKePkiMqMEr+5jJfchwH3+BZGC iA/oDJ/OS0WYpnkRjHUvuX9H9+vA+go= X-MC-Unique: 98YytAXvMZmHTuRmqAt5KA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , John Snow , Vladimir Sementsov-Ogievskiy , Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org (open list:Block Jobs) Subject: [PULL 05/22] block/mirror: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:28 +0400 Message-ID: <20241002083646.2893078-6-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858375292116600 From: Marc-Andr=C3=A9 Lureau ../block/mirror.c:1066:22: error: =E2=80=98iostatus=E2=80=99 may be used un= initialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 61f0a717b7..54e3a7ea9d 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -931,7 +931,7 @@ static int coroutine_fn mirror_run(Job *job, Error **er= rp) MirrorBDSOpaque *mirror_top_opaque =3D s->mirror_top_bs->opaque; BlockDriverState *target_bs =3D blk_bs(s->target); bool need_drain =3D true; - BlockDeviceIoStatus iostatus; + BlockDeviceIoStatus iostatus =3D BLOCK_DEVICE_IO_STATUS__MAX; int64_t length; int64_t target_length; BlockDriverInfo bdi; --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858483; cv=none; d=zohomail.com; s=zohoarc; b=Bd9Jv3gPgcGmxmL0HgF+XKzk84m0hMjZKW8MnA8ypINfsXNwO95cIQ4Q45gim5v8R3RTMMYEBlbgcgRkWAitvDHfDsr/gpaFBn1xIiTJZjHKoDylVclO9thK96HuR7hkG0ULgzCULX4475ycVHaxEgshv6JVecJr1TnB0QA8Krs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858483; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=S9NRZFHdartb7Ou3+RYml//Je7hyhTH59cssL9F8c9E=; b=dVAy0p6jXpHuVJPmwhzLHSbdu1EW/wU6lSZerL/Xx1sblJ0nzOT3AY6sCITmsXh3CEgGHi+PnMpccWXY1s7077+vtU/+BSHmNTz7E3QM2uZQJGmyn3KhUgx1upbdRzAw6XpxnY00I500es4VnA8Hrb1KuevVqoMONi9Hggxfvwo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858483982816.7770334953758; Wed, 2 Oct 2024 01:41:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurQ-0001Hj-3h; Wed, 02 Oct 2024 04:37:28 -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 1svurN-0001HD-01 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:25 -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 1svurL-0005gc-N7 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:24 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-166-2waCqk0wMYSHUHE6nH2YuA-1; Wed, 02 Oct 2024 04:37:20 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1072C1955D97; Wed, 2 Oct 2024 08:37:19 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DC3C919560AD; Wed, 2 Oct 2024 08:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S9NRZFHdartb7Ou3+RYml//Je7hyhTH59cssL9F8c9E=; b=BCRGnz+9E36Sx0/wMVhQVvlsVmAB4+biq0a80Ht/mACbMTxd5isv1JGFZS+ivybL+Dwgkw ALv/XiwUBhU6WRizY2yLyWA/UKoHSb5xRzrF69F666A9SAZmiJd+mf3nt6EfqC72GouESE 8sC41EtEkktUAbn0jej6hYJPcLrrJPI= X-MC-Unique: 2waCqk0wMYSHUHE6nH2YuA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , John Snow , Vladimir Sementsov-Ogievskiy , Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org (open list:Block Jobs) Subject: [PULL 06/22] block/mirror: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:29 +0400 Message-ID: <20241002083646.2893078-7-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858485733116600 From: Marc-Andr=C3=A9 Lureau ../block/mirror.c:404:5: error: =E2=80=98ret=E2=80=99 may be used uninitial= ized [-Werror=3Dmaybe-uninitialized] ../block/mirror.c:895:12: error: =E2=80=98ret=E2=80=99 may be used uninitia= lized [-Werror=3Dmaybe-uninitialized] ../block/mirror.c:578:12: error: =E2=80=98ret=E2=80=99 may be used uninitia= lized [-Werror=3Dmaybe-uninitialized] Change a variable to int, as suggested by Manos: "bdrv_co_preadv() which is int and is passed as an int argument to mirror_read_complete()" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 54e3a7ea9d..2afe700b4d 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -349,7 +349,7 @@ static void coroutine_fn mirror_co_read(void *opaque) MirrorOp *op =3D opaque; MirrorBlockJob *s =3D op->s; int nb_chunks; - uint64_t ret; + int ret =3D -1; uint64_t max_bytes; =20 max_bytes =3D s->granularity * s->max_iov; @@ -565,7 +565,7 @@ static void coroutine_fn GRAPH_UNLOCKED mirror_iteratio= n(MirrorBlockJob *s) =20 bitmap_set(s->in_flight_bitmap, offset / s->granularity, nb_chunks); while (nb_chunks > 0 && offset < s->bdev_length) { - int ret; + int ret =3D -1; int64_t io_bytes; int64_t io_bytes_acct; MirrorMethod mirror_method =3D MIRROR_METHOD_COPY; @@ -841,7 +841,7 @@ static int coroutine_fn GRAPH_UNLOCKED mirror_dirty_ini= t(MirrorBlockJob *s) int64_t offset; BlockDriverState *bs; BlockDriverState *target_bs =3D blk_bs(s->target); - int ret; + int ret =3D -1; int64_t count; =20 bdrv_graph_co_rdlock(); --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858291; cv=none; d=zohomail.com; s=zohoarc; b=RrXPv1iOBcMA//jkUYDMRKkl7QBJuiq3g1dPut7IdvlM9OSrlxvKD29MGxv/pZJk5YTszJgp8vKm7fbN7N69dSLYSGikKyDm2MLX5jyQu/YNnf4eNavjQzaIqbtunbPkSRjLXvll5hSARRNOvf6o2bTAeOGHexEwIIS/nztgrqU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858291; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=S4lvvbjCPot7FkZgTAJ+Z+t9T/rbkKdAOw4U4JfZh7Q=; b=LvGr6ip3mrUidky+b2+tUo7kkkwQYFEY+hvLnyegVa3eDVRqCD3R6G0fvg9Ivdp0+YHdvheVBggvKXvi2OBVMBC+lAk0BRFkmfEBzHsYN1VxKA+FxqWUIe0nq4cLC4KQOw88hCR9tgRy59B+xcAIW0o5jlDtv2r9sEuKvxooOdY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 172785829191928.894121841233527; Wed, 2 Oct 2024 01:38:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurW-0001Qd-KQ; Wed, 02 Oct 2024 04:37:34 -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 1svurT-0001O3-U5 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svurS-0005hH-Fw for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:31 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-691-fzaGAN6PNS-G4SxvgPHpkQ-1; Wed, 02 Oct 2024 04:37:25 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CD5BA1955D80; Wed, 2 Oct 2024 08:37:23 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5C57F3000197; Wed, 2 Oct 2024 08:37:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S4lvvbjCPot7FkZgTAJ+Z+t9T/rbkKdAOw4U4JfZh7Q=; b=Xj98WroHGJAEcGVGquyPn0DwLKhNDKeOmQd3ICf082pZINVpmiauWUIha+L/GcrHWFqvDO nKU/TnjX94/8h2AxTxVplLcdePUDBLKn6C3AkxwaJ7wYkIVH9wbQ9xloIOdcHeP/xmM6Jm 0Mu8J9Fw1xLIdhYQcxui8TmVw8uZsxE= X-MC-Unique: fzaGAN6PNS-G4SxvgPHpkQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , John Snow , Vladimir Sementsov-Ogievskiy , Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org (open list:Block Jobs) Subject: [PULL 07/22] block/stream: fix -Werror=maybe-uninitialized false-positives Date: Wed, 2 Oct 2024 12:36:30 +0400 Message-ID: <20241002083646.2893078-8-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858292652116600 From: Marc-Andr=C3=A9 Lureau ../block/stream.c:193:19: error: =E2=80=98unfiltered_bs=E2=80=99 may be use= d uninitialized [-Werror=3Dmaybe-uninitialized] ../block/stream.c:176:5: error: =E2=80=98len=E2=80=99 may be used uninitial= ized [-Werror=3Dmaybe-uninitialized] trace/trace-block.h:906:9: error: =E2=80=98ret=E2=80=99 may be used uniniti= alized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Acked-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Manos Pitsidianakis --- block/stream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/stream.c b/block/stream.c index 7031eef12b..9076203193 100644 --- a/block/stream.c +++ b/block/stream.c @@ -155,8 +155,8 @@ static void stream_clean(Job *job) static int coroutine_fn stream_run(Job *job, Error **errp) { StreamBlockJob *s =3D container_of(job, StreamBlockJob, common.job); - BlockDriverState *unfiltered_bs; - int64_t len; + BlockDriverState *unfiltered_bs =3D NULL; + int64_t len =3D -1; int64_t offset =3D 0; int error =3D 0; int64_t n =3D 0; /* bytes */ @@ -177,7 +177,7 @@ static int coroutine_fn stream_run(Job *job, Error **er= rp) =20 for ( ; offset < len; offset +=3D n) { bool copy; - int ret; + int ret =3D -1; =20 /* Note that even when no rate limit is applied we need to yield * with no pending I/O here so that bdrv_drain_all() returns. --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858393; cv=none; d=zohomail.com; s=zohoarc; b=QsWDP6xLxUCMmCxj8LmyqTD1mr28XPeBtIcTyZd2bo8XxqyCoj2CaHdlI5uqDU/IJTB5rSesFGz6yDhO0c04Z3gCLDn+NeHJ6xLbSex6SJgB4fYZnKXKR72MqM3PPgAH69MmKuKzQefwt9LBhVPwKgZKmeKyTEbk2FIm+Ab0LrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858393; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VtGkZhaSX+IxfoOdKjEfBlvK3kKNfL8AG2v9Iw0B/NQ=; b=fO33y8VDpUA8v35HkW/FST1u8vCNmJRCp/qou/MgQTUqLmayFoFQBE17eVWOxFO+YSQ5jFfIq6uNhsbqxDRyShK9Bge6SQu6hp9Mb2O0CMQpnvGQdAuxjoeEkFSaA0xe4k8EV7RMETui1GuWMgm7dp6LwFzigaAMQRSxGh1jM3Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 172785839317711.589428491874173; Wed, 2 Oct 2024 01:39:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurZ-0001Xd-B9; Wed, 02 Oct 2024 04:37:37 -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 1svurW-0001Rk-RB for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:34 -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 1svurU-0005hl-Qi for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:34 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-92-t2wWf_iJNCqlg3O-Mui-iQ-1; Wed, 02 Oct 2024 04:37:29 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2536B195608D; Wed, 2 Oct 2024 08:37:28 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1800819560AD; Wed, 2 Oct 2024 08:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VtGkZhaSX+IxfoOdKjEfBlvK3kKNfL8AG2v9Iw0B/NQ=; b=Q+1Jk94QwOxGXoXlg25zZOEskMbegP7e+IK5ZvjW2EP0psI2APsM0GoyyfhRnHE5HidNoL Ubf/xZwF8Ot12QMSkP5n+apf+WDBHm7VTOVAe+soiiUo6Lfww+T0zmY5aVLZIofYz3d7Eo gcNuWOswN4/Svl+4XSkzGOlGkLfPMJ0= X-MC-Unique: t2wWf_iJNCqlg3O-Mui-iQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , John Snow , qemu-block@nongnu.org (open list:IDE) Subject: [PULL 08/22] hw/ahci: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:31 +0400 Message-ID: <20241002083646.2893078-9-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858395189116600 From: Marc-Andr=C3=A9 Lureau ../hw/ide/ahci.c:989:58: error: =E2=80=98tbl_entry_size=E2=80=99 may be use= d uninitialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Manos Pitsidianakis --- hw/ide/ahci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7fc2a08df2..0eb24304ee 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -948,7 +948,6 @@ static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGL= ist *sglist, uint64_t sum =3D 0; int off_idx =3D -1; int64_t off_pos =3D -1; - int tbl_entry_size; IDEBus *bus =3D &ad->port; BusState *qbus =3D BUS(bus); =20 @@ -976,6 +975,8 @@ static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGL= ist *sglist, /* Get entries in the PRDT, init a qemu sglist accordingly */ if (prdtl > 0) { AHCI_SG *tbl =3D (AHCI_SG *)prdt; + int tbl_entry_size =3D 0; + sum =3D 0; for (i =3D 0; i < prdtl; i++) { tbl_entry_size =3D prdt_tbl_entry_size(&tbl[i]); --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858324; cv=none; d=zohomail.com; s=zohoarc; b=NPM+l+F0WmMvl58KOWBOoq8asAuVos4c9bLHyMRZjkwsNHYxDFygKT4QhvLEqEeBZMPMG39BuwXSaRVLsxNqfPhOKNZpLgWWUIX+JhZM5Zq+c6fok/JCnOfA6So+o6dYHGadAqGcDqG+SRFLueZpG9+kDCM7Wvs7OuCswoqkVO4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858324; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JWGVABklCLrU7/ALyC116NV9eFWhHW+S/KvcK29JhAU=; b=mnallNWMJX53vIBfe2aWRJT174Pw8RnBSCgI9JZRs8r0eLEYsB5U6LOUdVqiYCiz+qVr/BRX2myx36tCjAfTKgpbnAn9Aetv3mOjopSygdI3/L1HQM6eRJIuTUuJqiY+BmvLF5WFtqDVSH2m2TAmtfRuRQgoc8R/DDjpM9gU+4E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858324678664.62867457426; Wed, 2 Oct 2024 01:38:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurj-0001mF-Hl; Wed, 02 Oct 2024 04:37:47 -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 1svurc-0001ds-EL for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svura-0005ib-WA for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:40 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-h3KgxobKNgubi7Xauoo3ow-1; Wed, 02 Oct 2024 04:37:33 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 77BE71955EE9; Wed, 2 Oct 2024 08:37:32 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 66AA33000197; Wed, 2 Oct 2024 08:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JWGVABklCLrU7/ALyC116NV9eFWhHW+S/KvcK29JhAU=; b=Gp9rkI+IolBYUnDEK+bOJiFU+gwlhCmpSfyjd3SR0bGKhr8ojfeJ+8NNicMDvaASXeHlF1 9bsZBvhnFZdFme1bUG8WbdCKAJfrk3MVCsoSvN88WiwezMmO8u6vtNQhbWnrgRRG7v30kB Ip9GINBSU8EEUGly3HsQAVCzrQHp6qI= X-MC-Unique: h3KgxobKNgubi7Xauoo3ow-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Fam Zheng , "Michael S. Tsirkin" , Stefano Garzarella Subject: [PULL 09/22] hw/vhost-scsi: fix -Werror=maybe-uninitialized Date: Wed, 2 Oct 2024 12:36:32 +0400 Message-ID: <20241002083646.2893078-10-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858326784116600 From: Marc-Andr=C3=A9 Lureau ../hw/scsi/vhost-scsi.c:173:12: error: =E2=80=98ret=E2=80=99 may be used un= initialized [-Werror=3Dmaybe-uninitialized] It can be reached when num_queues=3D0. It probably doesn't make much sense to instantiate a vhost-scsi with 0 IO queues though. For now, make vhost_scsi_set_workers() return success/0 anyway, when no workers have been setup. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefano Garzarella --- hw/scsi/vhost-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 49cff2a0cb..22d16dc26b 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -172,7 +172,7 @@ static int vhost_scsi_set_workers(VHostSCSICommon *vsc,= bool per_virtqueue) struct vhost_dev *dev =3D &vsc->dev; struct vhost_vring_worker vq_worker; struct vhost_worker_state worker; - int i, ret; + int i, ret =3D 0; =20 /* Use default worker */ if (!per_virtqueue || dev->nvqs =3D=3D VHOST_SCSI_VQ_NUM_FIXED + 1) { --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858406; cv=none; d=zohomail.com; s=zohoarc; b=QsBF1PROGYickLz28+AjrwbiVqHRhYIEV+2XAL2Y0/8ACkDUkKepBm07TJITJVCtyLk8X6q98y4RrY7ILi48alyIkyqKhs160jO9/RZvMANCCXCYfgC6LNWntcAxWMEL209BlgT+2gA57JVxsnvMz7hASSTScpP28IkBDvwSG7g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858406; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=spwqmLWqFphyzD9JjnJ9g139Tq6qkYbqu8XRC6qnYMw=; b=UCoGHNXPA1NQWEqD8UYC6ZRLkqUGdk0nCAC3Zpl5tGOutHYr/KeXEG+hZHeuMJ3zCWxNccsrnWetbN4HpqpU1sytrZHKsUEXlSNtegGWj/y1N6n+vHLIlcKtBzD0FR85u8h+4Tl6NjgCGCBpOL4wjnT8xghnlFsaIdu+NHepfjk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858406943241.84426595368495; Wed, 2 Oct 2024 01:40:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurn-0001qd-Gq; Wed, 02 Oct 2024 04:37:51 -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 1svurk-0001nx-N0 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:49 -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 1svuri-0005jh-ML for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:47 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-9ZGoeoj3MLWH8qpRNQ7sRQ-1; Wed, 02 Oct 2024 04:37:39 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0CB4F19541BB; Wed, 2 Oct 2024 08:37:37 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F23001955E77; Wed, 2 Oct 2024 08:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=spwqmLWqFphyzD9JjnJ9g139Tq6qkYbqu8XRC6qnYMw=; b=RlaRubU3PgE+lI9nWhKXY/67I1Msx1I837EXLLt1L9Z1HDQIs/ycBAQ/FO0I6dAXyuzSkm 7nAtZgJ/gU2W1jvbITcvvhXwj39r/yClXA43tJFvRvUlzJHmJVm7Fd5YgSE+Ns6BqGbRb/ L85nWhXr83lWF/R2eL1Ha5bj6nF30sI= X-MC-Unique: 9ZGoeoj3MLWH8qpRNQ7sRQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org (open list:SD (Secure Card)) Subject: [PULL 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:33 +0400 Message-ID: <20241002083646.2893078-11-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858407091116600 From: Marc-Andr=C3=A9 Lureau ../hw/sd/sdhci.c:846:16: error: =E2=80=98res=E2=80=99 may be used uninitial= ized [-Werror=3Dmaybe-uninitialized] False-positive, because "length" is non-null. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Alex Benn=C3=A9e --- hw/sd/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 87122e4245..ed01499391 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -747,7 +747,7 @@ static void sdhci_do_adma(SDHCIState *s) const uint16_t block_size =3D s->blksize & BLOCK_SIZE_MASK; const MemTxAttrs attrs =3D { .memory =3D true }; ADMADescr dscr =3D {}; - MemTxResult res; + MemTxResult res =3D MEMTX_ERROR; int i; =20 if (s->trnmod & SDHC_TRNS_BLK_CNT_EN && !s->blkcnt) { --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858347; cv=none; d=zohomail.com; s=zohoarc; b=NYT0WxpvPNKNuFlVdF1pm6oyGI5STcV7D8/KgodUBXL6GCegrFv7SXP1GOsSLXJXumQgYOPmp8dXrFs65dw8XIexFoM++FJazAkhHodK2RwjypoKOuk/mmJTEjSfOmNZAVcAyJes0Z1UyAD9407z5ZAOujxB9zT+gzhzg/nlFh4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858347; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kDP3gfnmTHEOVcM/4gcmBWmQQU3SiUnP77QRuikq/aM=; b=aTu4HcmPwB0vK4eR5a8Nmk9SKWLfy6r1951VVTtGajR1TjwiJgCEtyz6hNHP4znU6u/uBadhQ1UZm/DPe4meattXwRY8vLRQclzub6jsbqxRQspOtF6MAirK2k/WMmEJ9y3oEvggs/n6GGvqwrWHkmHUZy68oqep5lO2hxTFa3M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858347609571.2807114568112; Wed, 2 Oct 2024 01:39:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurt-00021K-Bh; Wed, 02 Oct 2024 04:37:59 -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 1svurk-0001ny-N1 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svurh-0005jY-B5 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:47 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-401-C6zQf3TzP5-HucHTQu0KtQ-1; Wed, 02 Oct 2024 04:37:43 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A63351955D53; Wed, 2 Oct 2024 08:37:41 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 69C441956086; Wed, 2 Oct 2024 08:37:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kDP3gfnmTHEOVcM/4gcmBWmQQU3SiUnP77QRuikq/aM=; b=AgZ54HiUxySwaxdifuC5wQieWMmsSfZSGzKsMR4u3wrzB2iImG5psefa1B8Q9UDc9QXIQG Wo3S99P2LThZQhij6fe0w4zDFVkZ3OWMu+ZseBkom8Ku8GKb4ChnD79US+yERozB1sMZSk iugPEcr4nlN3T3eKq6azctF8PP/195Q= X-MC-Unique: C6zQf3TzP5-HucHTQu0KtQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , John Snow , Vladimir Sementsov-Ogievskiy , Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org (open list:Block Jobs) Subject: [PULL 11/22] block/block-copy: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:34 +0400 Message-ID: <20241002083646.2893078-12-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858349002116600 From: Marc-Andr=C3=A9 Lureau ../block/block-copy.c:591:12: error: =E2=80=98ret=E2=80=99 may be used unin= itialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/block-copy.c b/block/block-copy.c index 93eb1b2664..eddb0b81e0 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -584,7 +584,7 @@ static coroutine_fn int block_copy_task_entry(AioTask *= task) BlockCopyState *s =3D t->s; bool error_is_read =3D false; BlockCopyMethod method =3D t->method; - int ret; + int ret =3D -1; =20 WITH_GRAPH_RDLOCK_GUARD() { ret =3D block_copy_do_copy(s, t->req.offset, t->req.bytes, &method, --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858304; cv=none; d=zohomail.com; s=zohoarc; b=HWa+PFagyOKejsO9DHvs0SJnNvFqJMtYGqipWWP4UVmaanDU5uHhlCkYxk1YQw++ZvcyCDPEKsOdNISGdUqdpqoMXxRNdYNEdX23mMYFp7j1Ga1yh2mmnePSSAwzwWT1VOLaUd+dnm9Fy7DmsVmU/seMaCVud8WxuYiskpzh51Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858304; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=n8dGE0A38f5VTr5H+JPJ+JEIz9Dt2fSH4V7WEzu6LPU=; b=BbNiUugeTW+xlwdHexe7OpqaXZcnGILWIrLGvSiIcnP5Ice8vzfIfxpIW70YbIqTo5TFG3EaOQk680ediY07k2xHKiCH+H8OSXmmzpy+Rx3dMngN9oTOR5H2vh5p4ER6Yejbt5bWVoDsjQkDUhwN/EMelNJgqZA1JnIWYlq/SDI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17278583045881003.9694985260718; Wed, 2 Oct 2024 01:38:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svurz-00025P-08; Wed, 02 Oct 2024 04:38:03 -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 1svurq-00020z-Ai for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:55 -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 1svurn-0005kJ-Kp for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:52 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-438-VpFDo23YONS-wzo8d0dvXw-1; Wed, 02 Oct 2024 04:37:48 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5971B1955F0D; Wed, 2 Oct 2024 08:37:46 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 224CB19560A2; Wed, 2 Oct 2024 08:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n8dGE0A38f5VTr5H+JPJ+JEIz9Dt2fSH4V7WEzu6LPU=; b=hYyPoRaMbGCut+ODGZ4PRoflrtlnYJcVaYn7+4dNEVpLMhWmeA39Bao+yvozf9b3PND9+L oucM1TJIqBlquM/hlY4JLlxEvME0iVAlQ2a7SD2KsIAJZCBjFHTHPkXJ9PwGMgCytYeC1v 5yXmq3fLREYhMMF/qESZaSD0CAZPmbc= X-MC-Unique: VpFDo23YONS-wzo8d0dvXw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Hyman Huang , Peter Xu , Fabiano Rosas Subject: [PULL 12/22] migration: fix -Werror=maybe-uninitialized false-positives Date: Wed, 2 Oct 2024 12:36:35 +0400 Message-ID: <20241002083646.2893078-13-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858306725116600 From: Marc-Andr=C3=A9 Lureau ../migration/dirtyrate.c:186:5: error: =E2=80=98records=E2=80=99 may be use= d uninitialized [-Werror=3Dmaybe-uninitialized] ../migration/dirtyrate.c:168:12: error: =E2=80=98gen_id=E2=80=99 may be use= d uninitialized [-Werror=3Dmaybe-uninitialized] ../migration/migration.c:2273:5: error: =E2=80=98file=E2=80=99 may be used = uninitialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Acked-by: Peter Xu Reviewed-by: Hyman Huang --- migration/dirtyrate.c | 4 ++-- migration/migration.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 5478d58de3..233acb0855 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -149,12 +149,12 @@ int64_t vcpu_calculate_dirtyrate(int64_t calc_time_ms, unsigned int flag, bool one_shot) { - DirtyPageRecord *records; + DirtyPageRecord *records =3D NULL; int64_t init_time_ms; int64_t duration; int64_t dirtyrate; int i =3D 0; - unsigned int gen_id; + unsigned int gen_id =3D 0; =20 retry: init_time_ms =3D qemu_clock_get_ms(QEMU_CLOCK_REALTIME); diff --git a/migration/migration.c b/migration/migration.c index ae2be31557..021faee2f3 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2278,7 +2278,7 @@ static bool migrate_handle_rp_resume_ack(MigrationSta= te *s, */ static void migration_release_dst_files(MigrationState *ms) { - QEMUFile *file; + QEMUFile *file =3D NULL; =20 WITH_QEMU_LOCK_GUARD(&ms->qemu_file_lock) { /* --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858348; cv=none; d=zohomail.com; s=zohoarc; b=OQh00jjkGHs7bp9hpZBS2Tykt/7uTwisB4LNyrgdd4qI5FA0h+Tw+/V2gWLH/BSak0pcV4Nmcy2vWAMTIsa2feUeCc6nklcNJ7DXLKCJZcquX+oIr3kvqRtVMeXbj48k33X55kacZCBsvNtMBzc7bG1nXVEAgHjZVqr/lp5Ik3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858348; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NBIdUVg4Ambg7bYy+M68UshrEz83KnaBQNGOPS+kl2w=; b=TlIgfsHHqqJS9JneKqYJrWnsma96HXbH+RqJ2Qyf+k9E5WcniHTput9Use950BwHAe9TxanhR/fZUyJgvZkEK74r+CksIUXNUrDt0L3eCM40hkC/MO0d53+jNtdwLU9pXNOuozyGhIQmIEWSijjIJyUSVed8c7gYQ46o2OOhLt4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858348978904.2355388914559; Wed, 2 Oct 2024 01:39:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svus2-0002Iy-TA; Wed, 02 Oct 2024 04:38:07 -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 1svuru-000245-Jb for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:59 -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 1svurq-0005kY-TJ for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:37:58 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-692-n4EKX9w2Okigiqjhx8cH3A-1; Wed, 02 Oct 2024 04:37:52 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C162D195609E; Wed, 2 Oct 2024 08:37:51 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 26E6E19560A2; Wed, 2 Oct 2024 08:37:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NBIdUVg4Ambg7bYy+M68UshrEz83KnaBQNGOPS+kl2w=; b=Vs4cL3TQdBmmSKJosfLAnE6PJ0pYMC+GS3VErzvMFB3hzxIjxyR+F+EMft69abLzMCcFSd S9CN9l5A0XCiE/SV3TegoPEt8NU9dHHddjQFrMoPpd65dGi6CKvSYDFR7BA29bD/vULr6s Vqj+2VohbVlBAtDTNMywHpQuGe2ZoeM= X-MC-Unique: n4EKX9w2Okigiqjhx8cH3A-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Hajnoczi , "Michael S. Tsirkin" , Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org (open list:virtio-blk) Subject: [PULL 13/22] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:36 +0400 Message-ID: <20241002083646.2893078-14-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858350836116600 From: Marc-Andr=C3=A9 Lureau ../hw/block/virtio-blk.c:1212:12: error: =E2=80=98rq=E2=80=99 may be used u= ninitialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella --- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 115795392c..9166d7974d 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -1060,7 +1060,7 @@ static void virtio_blk_dma_restart_cb(void *opaque, b= ool running, VirtIOBlock *s =3D opaque; uint16_t num_queues =3D s->conf.num_queues; g_autofree VirtIOBlockReq **vq_rq =3D NULL; - VirtIOBlockReq *rq; + VirtIOBlockReq *rq =3D NULL; =20 if (!running) { return; --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858490; cv=none; d=zohomail.com; s=zohoarc; b=nxNd2YyEgwMo5Axoi9jdD1l+rTQgt9FHiz8kjhHwWqjDBP0cxHiFqSSI8xKlTZp0DX0hum3DIt6GGvysHdveW/YkEgnjacP7qqL03QNtVO86AmJeFk5pgsZ+Z7kiBBE3B/BIIj+AvAN7BtjbyHSXuLLkvOwuAiJHkFmNdTQXH0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858490; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rkCDdXwIPlr39y+SeAk0OhVm7wJjgw4TMj43kjTyWsQ=; b=V/4pcOil+opqs/d3FDAmih7NwJVeT0RRQXvDHOSn1s1nYUSgYZk7YFVK1c1Bs4IdrOzRZla7OkXbT5yhOPdQIni4QjG4edNBl06cAoKjk08Qdk18h+/gR7wzDDkxz3b5ntFovN2XmzqlsF1cwFC+uplhvFYkzQm6ItmpPFTOHMM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858490130776.4726950775437; Wed, 2 Oct 2024 01:41:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svus5-0002QU-CM; Wed, 02 Oct 2024 04:38:09 -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 1svurz-0002DV-AF for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svurx-0005kx-Uc for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:03 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-125-cK-JW_NEMXCWD5WBhw3J_g-1; Wed, 02 Oct 2024 04:37:58 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B1EFF19560B0; Wed, 2 Oct 2024 08:37:56 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2E2F4300019B; Wed, 2 Oct 2024 08:37:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rkCDdXwIPlr39y+SeAk0OhVm7wJjgw4TMj43kjTyWsQ=; b=g9xGO40ZP/xZoRTMKjMkLE2LNJS4iZr1kktFBsXBnKOxsGdFnXqDw6Vkd0s9iBL/uo+YSg FpGjQymoKRybs/evt4CTSh9qgcUjC5T+VJt5OcVUcBgG7FS7Vp6Bq4ZdJkTUGIKoiJB0J4 FbbqNXifvfa2cxcy5mXYlv+A9zm0aZE= X-MC-Unique: cK-JW_NEMXCWD5WBhw3J_g-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Xu , Fabiano Rosas Subject: [PULL 14/22] migration: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:37 +0400 Message-ID: <20241002083646.2893078-15-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858491405116600 From: Marc-Andr=C3=A9 Lureau ../migration/ram.c:1873:23: error: =E2=80=98dirty=E2=80=99 may be used unin= itialized [-Werror=3Dmaybe-uninitialized] When 'block' !=3D NULL, 'dirty' is initialized. Signed-off-by: Marc-Andr=C3=A9 Lureau Acked-by: Peter Xu --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 81eda2736a..326ce7eb79 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1793,7 +1793,7 @@ static bool get_queued_page(RAMState *rs, PageSearchS= tatus *pss) { RAMBlock *block; ram_addr_t offset; - bool dirty; + bool dirty =3D false; =20 do { block =3D unqueue_page(rs, &offset); --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858388; cv=none; d=zohomail.com; s=zohoarc; b=S900za818lmViPUKVeKaJEhoLpfPzR4qRXhmDGYlaSgswTP6LL/x5zWdYI612yR0XcbL4dDiCrcG2V0JL0EbERXNYxsfeakQpQt2LxB3+6JpWx7DUCgfH7HYI8LigOLdb1d7FS5zMoaqs2GQomBFlo999Iiq17cTcKv8khkX5mI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858388; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=h0TucsGaDkti7HZLhRtFl+SgwnfZTPnZhvzxf2cTiUg=; b=YAKZVTtzedFToIc8Q8j63url4GQuNCJLFZ213aeT1F1FBYarUT/u7cWzkb8dOuhbm548/P57YWA6FtixCMwzy9cjvAMS4uiJk+wNFKkL2WcjagpdJwH0YSONi7vOmOa3UGyoEBiKcCUsovSVVivOlnTwCabZnYxtWmixvEbCxmY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858388443473.94506496811266; Wed, 2 Oct 2024 01:39:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svus7-0002gA-IT; Wed, 02 Oct 2024 04:38:11 -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 1svus5-0002Qb-Ac for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svus4-0005lP-1F for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:09 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-673-YjvJGunPMFWsh4sZBKNEVQ-1; Wed, 02 Oct 2024 04:38:02 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8D76E19560B0; Wed, 2 Oct 2024 08:38:01 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4831B300019B; Wed, 2 Oct 2024 08:37:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h0TucsGaDkti7HZLhRtFl+SgwnfZTPnZhvzxf2cTiUg=; b=BKR27thZisIbaLJH12HlOZcf9O48CZYvo2BLyYtK+Tg8TvJWerZyz3DXnAO2YeMYyCk68O nbPeqhtCOJ2Se37EPrKxNkcG2gL5/AzcMM+v1vIjPxZwad4zZLBQ390ackiBrh4iQE2eRs /0vIRyJTAzzRQkPufz0pWEucr7kmapQ= X-MC-Unique: YjvJGunPMFWsh4sZBKNEVQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier Subject: [PULL 15/22] linux-user/hppa: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:38 +0400 Message-ID: <20241002083646.2893078-16-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858388990116600 From: Marc-Andr=C3=A9 Lureau ../linux-user/hppa/cpu_loop.c: In function =E2=80=98hppa_lws=E2=80=99: ../linux-user/hppa/cpu_loop.c:106:17: error: =E2=80=98ret=E2=80=99 may be u= sed uninitialized [-Werror=3Dmaybe-uninitialized] 106 | env->gr[28] =3D ret; Add g_assert_not_reached() to help compiler, as suggested by Laurent. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Laurent Vivier --- linux-user/hppa/cpu_loop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index bc093b8fe8..23b38ff9b2 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -99,6 +99,8 @@ static abi_ulong hppa_lws(CPUHPPAState *env) #endif } break; + default: + g_assert_not_reached(); } break; } --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858346; cv=none; d=zohomail.com; s=zohoarc; b=UcKIEDII1VTmPx25K61FVkLO1STjQycVwWq5Shc5xlrjvE2tYyrsYS2N36YzjUcmzWfYF/tqmxfKa83cYOEFgN+0oGVADlHPUfsqmY3p/Arbodj/R97rG/iefZcb5QQdzxAPR6gTG/2MqU4x6tRHodQQKGT8aJ/fYdP8vvEhUDQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858346; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=T8/u+VPoMiEM0MMm1KzR655zodS3TzdLVN+AaPgKy20=; b=iHo+DDm3ckLZFbsXyI0zmv+g5xZd8j3hpAWkygR9b6vfuA2A5rrEgE8tpwEKSierF4pnE8OV5oxKpVR7g2hw9F1kvpH2RSaJdUgZj4icvmqjHRGxoRC9GfpsHQoTyPCjmanLPWb8tjkGXr8gqSYDgE24jcL5LQ12tSwMJSP7xuA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858346971630.256514713813; Wed, 2 Oct 2024 01:39:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svusA-0002sa-Ir; Wed, 02 Oct 2024 04:38:14 -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 1svus8-0002lY-9n for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:12 -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 1svus6-0005lq-Ld for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:12 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-520-fAqlNs8uPiesTnKiNgRS1w-1; Wed, 02 Oct 2024 04:38:08 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D095B1955E8E; Wed, 2 Oct 2024 08:38:06 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9054D3000197; Wed, 2 Oct 2024 08:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T8/u+VPoMiEM0MMm1KzR655zodS3TzdLVN+AaPgKy20=; b=H7C9dU0nVyxS5SY3q7d0y0D9xi1RmyVy9kwT5e4djqWtelbwOxHqHVRK/aa3VlNC7yxzIY OY7NdBk2TD3j4ToVG+HAU+F/al6G3sZqm2HIKaLlSZ35Cs5SHfZVbO7rp15HQCt7HuoSM/ Xk05Kw/trZDxKP5yIEkCm+UqvW51c1I= X-MC-Unique: fAqlNs8uPiesTnKiNgRS1w-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Song Gao Subject: [PULL 16/22] target/loongarch: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:39 +0400 Message-ID: <20241002083646.2893078-17-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858349208116600 From: Marc-Andr=C3=A9 Lureau ../target/loongarch/gdbstub.c:55:20: error: =E2=80=98val=E2=80=99 may be us= ed uninitialized [-Werror=3Dmaybe-uninitialized] 55 | return gdb_get_reg32(mem_buf, val); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../target/loongarch/gdbstub.c:39:18: note: =E2=80=98val=E2=80=99 was declar= ed here 39 | uint64_t val; Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- target/loongarch/gdbstub.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/target/loongarch/gdbstub.c b/target/loongarch/gdbstub.c index 7ca245ee81..3a03cf9cba 100644 --- a/target/loongarch/gdbstub.c +++ b/target/loongarch/gdbstub.c @@ -34,26 +34,28 @@ void write_fcc(CPULoongArchState *env, uint64_t val) int loongarch_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int= n) { CPULoongArchState *env =3D cpu_env(cs); - uint64_t val; - - if (0 <=3D n && n < 32) { - val =3D env->gpr[n]; - } else if (n =3D=3D 32) { - /* orig_a0 */ - val =3D 0; - } else if (n =3D=3D 33) { - val =3D env->pc; - } else if (n =3D=3D 34) { - val =3D env->CSR_BADV; - } =20 if (0 <=3D n && n <=3D 34) { + uint64_t val; + + if (n < 32) { + val =3D env->gpr[n]; + } else if (n =3D=3D 32) { + /* orig_a0 */ + val =3D 0; + } else if (n =3D=3D 33) { + val =3D env->pc; + } else /* if (n =3D=3D 34) */ { + val =3D env->CSR_BADV; + } + if (is_la64(env)) { return gdb_get_reg64(mem_buf, val); } else { return gdb_get_reg32(mem_buf, val); } } + return 0; } =20 --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858378; cv=none; d=zohomail.com; s=zohoarc; b=AI2AzQhIh23QJLoQDaPG/jDFlnvzzxt5Lpkr539c85SREnQYPlCcXfqzHfMrnjMc35XB82GeMRKxJKw3ijJhKbtlhyWF1WXf5nR7CJWMK1QLBp2Peht7mpC3JdqZYvgSDjaZH7c0M7Vs8nZ6LVgiBwAWJt0TtZqWn24NagbwSME= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858378; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=K8zuyWRlcmgvCrvJZZ7j0OY3Iv09WHadPXfLiGdv5Rw=; b=N8iuG1SSSX2emzriiy64ecQFP44dvSEoXovpEpzaWcruEiS2MeFn78zdw8ULW56gbd4OaKfYu+w+qLdiECVzUT2pvIo/QIT1RwmeKTb/xBAdm33umQnFwd4OfiXs+lfEN1b8NfWpMx2QZX0aPc4D7nYbCOKm3Q1mAKQkCuyF/FA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858378955462.28954097734857; Wed, 2 Oct 2024 01:39:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svusD-00038e-UP; Wed, 02 Oct 2024 04:38:17 -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 1svusC-00031R-0q for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svusA-0005m7-Au for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:15 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-153-CzVmtc_aOj2H0QqGcDcECA-1; Wed, 02 Oct 2024 04:38:12 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3B62A1956088; Wed, 2 Oct 2024 08:38:11 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 42E4B3000197; Wed, 2 Oct 2024 08:38:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K8zuyWRlcmgvCrvJZZ7j0OY3Iv09WHadPXfLiGdv5Rw=; b=Ie81L7E9UhXKdKLHJYL9WSBzEUw78MoJdwWZLAGXviEDdl2JmZXOW7rK59AGRCvSDvQs07 +qWPUqrUJBpe0dV3nRRL7JoZ2ltiGxDiZQjDhaNl9SfAwscJUrkyKrTRR78LVINnlcb+85 ECHM3BzDkDEwKdMu6C1xodRFFVOsHik= X-MC-Unique: CzVmtc_aOj2H0QqGcDcECA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 17/22] tests: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:40 +0400 Message-ID: <20241002083646.2893078-18-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858380967116600 From: Marc-Andr=C3=A9 Lureau ../tests/unit/test-block-iothread.c:773:17: error: =E2=80=98job=E2=80=99 ma= y be used uninitialized [-Werror=3Dmaybe-uninitialized] /usr/include/glib-2.0/glib/gtestutils.h:73:53: error: =E2=80=98ret=E2=80=99= may be used uninitialized [-Werror=3Dmaybe-uninitialized] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/unit/test-bdrv-drain.c | 2 +- tests/unit/test-block-iothread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test-bdrv-drain.c b/tests/unit/test-bdrv-drain.c index 666880472b..c112d5b189 100644 --- a/tests/unit/test-bdrv-drain.c +++ b/tests/unit/test-bdrv-drain.c @@ -722,7 +722,7 @@ static void test_blockjob_common_drain_node(enum drain_= type drain_type, BlockJob *job; TestBlockJob *tjob; IOThread *iothread =3D NULL; - int ret; + int ret =3D -1; =20 src =3D bdrv_new_open_driver(&bdrv_test, "source", BDRV_O_RDWR, &error_abort); diff --git a/tests/unit/test-block-iothread.c b/tests/unit/test-block-iothr= ead.c index 3766d5de6b..20ed54f570 100644 --- a/tests/unit/test-block-iothread.c +++ b/tests/unit/test-block-iothread.c @@ -745,7 +745,7 @@ static void test_propagate_mirror(void) AioContext *main_ctx =3D qemu_get_aio_context(); BlockDriverState *src, *target, *filter; BlockBackend *blk; - Job *job; + Job *job =3D NULL; Error *local_err =3D NULL; =20 /* Create src and target*/ --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858331; cv=none; d=zohomail.com; s=zohoarc; b=fGQFt0NyMiCW9s+yKwpKf8jOS3fLRuo4aEFjEEFogKhhYAwCadtf30mdxkeF3XQXX6JGn3b75B7+lq3gRwavi1QBi8WbfPk0eH/B3E2dlJK+FUfOFMzBOXQik6yxQfkyLgFbLqGrywNr5+PvsADophxGa9u+ECOLt0VqgGdHO60= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858331; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=F6Ld81vZrfFcYoL74U0E8YBfen7BWfTnTlNejJF+dq8=; b=ibF7jSR8wcj0JUPipasj6PpurYxbAZlY2+lhfh1ULQnyI9sUYdDl0+1rw3js/mKV4vRuB/yiuOclm77yEr/eGiN4U7ZS0coBUIf/EbOJBtuLWaayFstCleZb5F2y9Vcg1a8+WfFayDE0sguG3dWamEoHVxUPLV2BBaXSXu+zb5k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858331307734.9383167871515; Wed, 2 Oct 2024 01:38:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svusJ-0003Ph-R9; Wed, 02 Oct 2024 04:38:23 -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 1svusI-0003LZ-6O for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:22 -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 1svusG-0005mO-Qa for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:21 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-214-yFOwmnFiMyiTYWxHj0kDOg-1; Wed, 02 Oct 2024 04:38:17 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 084B51955D5A; Wed, 2 Oct 2024 08:38:16 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A0B333000197; Wed, 2 Oct 2024 08:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F6Ld81vZrfFcYoL74U0E8YBfen7BWfTnTlNejJF+dq8=; b=ZR7XXHDRFBtnyyJNvfTVRgFfiKW5iOTeiD/TCWKCkT/Hv/TG6YYBkgy9PJ6CG/6nDTM6ZC lNeN0HbsU63/pGqnZDH53AILay4wdbzS3FZHXQxa6h8DwedXB3LsSusZW1w0si6HP7FWQu X5iGtXrgVAtQohTNQxVj4Ro9TREszik= X-MC-Unique: yFOwmnFiMyiTYWxHj0kDOg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Michael S. Tsirkin" , Stefano Garzarella , =?UTF-8?q?Eugenio=20P=C3=A9rez?= Subject: [PULL 18/22] hw/virtio: fix -Werror=maybe-uninitialized Date: Wed, 2 Oct 2024 12:36:41 +0400 Message-ID: <20241002083646.2893078-19-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858332858116600 From: Marc-Andr=C3=A9 Lureau ../hw/virtio/vhost-shadow-virtqueue.c:545:13: error: =E2=80=98r=E2=80=99 ma= y be used uninitialized [-Werror=3Dmaybe-uninitialized] Set `r` to 0 at every loop, since we don't check vhost_svq_get_buf() return value. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefano Garzarella --- hw/virtio/vhost-shadow-virtqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-vi= rtqueue.c index fc5f408f77..3b2beaea24 100644 --- a/hw/virtio/vhost-shadow-virtqueue.c +++ b/hw/virtio/vhost-shadow-virtqueue.c @@ -526,10 +526,10 @@ static void vhost_svq_flush(VhostShadowVirtqueue *svq, size_t vhost_svq_poll(VhostShadowVirtqueue *svq, size_t num) { size_t len =3D 0; - uint32_t r; =20 while (num--) { int64_t start_us =3D g_get_monotonic_time(); + uint32_t r =3D 0; =20 do { if (vhost_svq_more_used(svq)) { --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858342; cv=none; d=zohomail.com; s=zohoarc; b=nhmDT7Tv9BI+4b6SKxAwhvTkkCLivhEPd/HMGTLLLV+TjLHxO+bS9SFtPfE4ux9vkw5lHLhGU5cAb25YNSs8rtPaeakrVN+rqVMVBOOD3h384DEHYULeTKhnNkBhX3HJAubcD+yzRyUGdyUyWR7Hy/4YQJyX/Nitxoq0mlVhSsM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858342; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hnTWG1xtZxFvQ94Nvx9Z7i3N+vIJo0NZqqTe1iy6fNc=; b=Wd/J7dLxXIrmzGhRGfb3al2FEcdoa8VuKpXJBvxnVm9KuQqMWzFPClURsnVfyk/VnRhJBGwbayr3zzqIPJWXY60Y//1rjNRwt889GX9pOrIBI0i5mlO1Lxz7c61JonNxRfIa6O6OtHXrVRdfFMmK6esu6N98ZIgl8hI7UvlcArk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858342233468.3635900939913; Wed, 2 Oct 2024 01:39:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svusR-0003q7-HI; Wed, 02 Oct 2024 04:38:31 -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 1svusO-0003gy-7T for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:28 -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 1svusM-0005md-K0 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:27 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-56-Q6vx3A7gOzOyCXcgTZEumA-1; Wed, 02 Oct 2024 04:38:21 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C2ABE19560B4; Wed, 2 Oct 2024 08:38:20 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 49DBE19560A3; Wed, 2 Oct 2024 08:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hnTWG1xtZxFvQ94Nvx9Z7i3N+vIJo0NZqqTe1iy6fNc=; b=DHPI1nHiyZMpaIM0hLOjHn4g5uTlvJiM2ErJw0JQkw5X0vKPT6FJFZ9aSEwOX6QIMFhFxy OCKCEsP3t7YfdmdB1eDYQRkCqAH/vkSs+1H/BSZUrTfqm3BhA/Pufu9yE2zNGiPsTR5Y1W TyHEuGkL7vS+M2zkF+yKnurUO1Zk7vo= X-MC-Unique: Q6vx3A7gOzOyCXcgTZEumA-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , "Michael S. Tsirkin" , Stefano Garzarella Subject: [PULL 19/22] hw/virtio: freeing leaked memory from vhost_svq_get_buf in vhost_svq_poll Date: Wed, 2 Oct 2024 12:36:42 +0400 Message-ID: <20241002083646.2893078-20-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858342832116600 From: Marc-Andr=C3=A9 Lureau vhost_svq_get_buf() may return a VirtQueueElement that should be freed. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eugenio P=C3=A9rez --- hw/virtio/vhost-shadow-virtqueue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-vi= rtqueue.c index 3b2beaea24..37aca8b431 100644 --- a/hw/virtio/vhost-shadow-virtqueue.c +++ b/hw/virtio/vhost-shadow-virtqueue.c @@ -414,6 +414,7 @@ static uint16_t vhost_svq_last_desc_of_chain(const Vhos= tShadowVirtqueue *svq, return i; } =20 +G_GNUC_WARN_UNUSED_RESULT static VirtQueueElement *vhost_svq_get_buf(VhostShadowVirtqueue *svq, uint32_t *len) { @@ -528,6 +529,7 @@ size_t vhost_svq_poll(VhostShadowVirtqueue *svq, size_t= num) size_t len =3D 0; =20 while (num--) { + g_autofree VirtQueueElement *elem =3D NULL; int64_t start_us =3D g_get_monotonic_time(); uint32_t r =3D 0; =20 @@ -541,7 +543,7 @@ size_t vhost_svq_poll(VhostShadowVirtqueue *svq, size_t= num) } } while (true); =20 - vhost_svq_get_buf(svq, &r); + elem =3D vhost_svq_get_buf(svq, &r); len +=3D r; } =20 --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858388; cv=none; d=zohomail.com; s=zohoarc; b=meKB8y1o/9z02HvSc6lmmLmGx/u/8zy+ptCs2xmyQwBhO7ulDqJzc7ggdmZcRVQW7+Ya+vy1x8B/eOr1zAVqVVp+m5JAxWkNbaqF11N+Uq8H7KZSxv6b4mxrU+MGS4BNdK1+WEsLVazOJTJCqgg9VIqyK+RZNhqIVrE7rs4wQYo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858388; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5UF8bQRZOHHLGFg/EzQNfXKnv55ZHiKzKyt92LZl+9c=; b=G3hWyCFP8/gaO3njTrcILnxN5BtY75gHkdHA61anoXz7KUsiZOG9MBYl8AmaT3FrXQJ3OE13E7oZ5a+D0PAM57xJg6h4YJy07aYApM3yUtl62r5/Y0RtehOuNMGZdJQ+km0eQU3WPmRhDUmF8vFUtOI2JV1ZOPlJmycMFez/gyA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858388208906.5284082222256; Wed, 2 Oct 2024 01:39:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svusi-0004OX-H4; Wed, 02 Oct 2024 04:38:51 -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 1svusT-0004Ec-S3 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svusS-0005mx-CH for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:33 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-25-1Pat6D7cNfGND3v6Glf_sQ-1; Wed, 02 Oct 2024 04:38:27 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 27AC019560B4; Wed, 2 Oct 2024 08:38:26 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0A0EE3000198; Wed, 2 Oct 2024 08:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5UF8bQRZOHHLGFg/EzQNfXKnv55ZHiKzKyt92LZl+9c=; b=URcj+GhJAVbqKsc19u2z10yQy6ojzf7gmmcANddQkyXzxW0r1xdzGhJRCEqI6UHVXaaX1/ iq/mRzv57gxIMQT/bKmqDwWqur0KhiSZD/CKEeRz2PlDRjUue6A8XCljd4LWcD2elKKOfW zOg4bL6vOt9JKpO5M1l4PklRBVw6nvA= X-MC-Unique: 1Pat6D7cNfGND3v6Glf_sQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org (open list:raw) Subject: [PULL 20/22] block: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:43 +0400 Message-ID: <20241002083646.2893078-21-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858388990116601 From: Marc-Andr=C3=A9 Lureau ../block/file-posix.c:1405:17: error: =E2=80=98zoned=E2=80=99 may be used u= ninitialized [-Werror=3Dmaybe-uninitialized] 1405 | if (ret < 0 || zoned =3D=3D BLK_Z_NONE) { Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index ff928b5e85..90fa54352c 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1398,7 +1398,7 @@ static void raw_refresh_zoned_limits(BlockDriverState= *bs, struct stat *st, Error **errp) { BDRVRawState *s =3D bs->opaque; - BlockZoneModel zoned; + BlockZoneModel zoned =3D BLK_Z_NONE; int ret; =20 ret =3D get_sysfs_zoned_model(st, &zoned); --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858363; cv=none; d=zohomail.com; s=zohoarc; b=EUkEvmd5oUJPDsRcJyMiOGU184X4oZEhK44Kl/ZgHVmDJIviLSxPchRUW6g5ZGJ7UZKCuSMDN2Q5mhFzDM9yOAZEaADE/2LDci9gC1uL41C2RvuNALKEOiBEv2ONJn182AM+t/c74NXxZi/TQhVsgTUky+c1UmytUH/TUzeTxiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858363; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=h1JuQuL2UkuXBJWfc7ll+XmI7QlTCOtmrJShYAzAwNE=; b=SQ/36fiVELAJtd+1v3v3kN/1mpTWM3KjJz8fIF1F+BAgx2rP5fPgVYti4zfhUHjUnCVBVWKv07d25DwlyLc4Eb3CnlEZaqO3i/cciZ0tN2onHAd4N5SXViDjain5RtJjtbK0jA1qtjkVqatTe29Y92OijQX/6uY/JnPZ1q+6j24= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858363288391.80955795447267; Wed, 2 Oct 2024 01:39:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svuso-0004bm-Fy; Wed, 02 Oct 2024 04:38:54 -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 1svusX-0004Ip-1L for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svusU-0005nI-QK for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:36 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-297-k8mOC4ZhOwi5eFX2xPJHcw-1; Wed, 02 Oct 2024 04:38:32 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5A4C019560A5; Wed, 2 Oct 2024 08:38:31 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C5B7319560A2; Wed, 2 Oct 2024 08:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h1JuQuL2UkuXBJWfc7ll+XmI7QlTCOtmrJShYAzAwNE=; b=OvaaijcDCr11OaKI4dnx7O9u0VPR9LMqKbjaS8KXtBS50p6u1SL24ZuvTWyLhqMnWpHhhM CspAX9fYzr1yusrG5xxhBumVVeIJztuoJbAjIhOU4Cp1mkEUS2fG73P+TlEq7iB6jJjTd6 QJ5aSCQ8sMM3zAHvtDcLIsnFTmw7Ous= X-MC-Unique: k8mOC4ZhOwi5eFX2xPJHcw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Greg Kurz , Christian Schoenebeck Subject: [PULL 21/22] fsdep/9p: fix -Werror=maybe-uninitialized false-positive Date: Wed, 2 Oct 2024 12:36:44 +0400 Message-ID: <20241002083646.2893078-22-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858365153116600 From: Marc-Andr=C3=A9 Lureau ../fsdev/9p-iov-marshal.c:93:23: error: =E2=80=98val=E2=80=99 may be used u= ninitialized [-Werror=3Dmaybe-uninitialized] and similar Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Christian Schoenebeck --- fsdev/9p-iov-marshal.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fsdev/9p-iov-marshal.c b/fsdev/9p-iov-marshal.c index a1c9beddd2..0c5a1a0fa2 100644 --- a/fsdev/9p-iov-marshal.c +++ b/fsdev/9p-iov-marshal.c @@ -84,9 +84,12 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int ou= t_num, size_t offset, break; } case 'w': { - uint16_t val, *valp; + uint16_t val =3D 0, *valp; valp =3D va_arg(ap, uint16_t *); copied =3D v9fs_unpack(&val, out_sg, out_num, offset, sizeof(v= al)); + if (copied <=3D 0) { + break; + } if (bswap) { *valp =3D le16_to_cpu(val); } else { @@ -95,9 +98,12 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int ou= t_num, size_t offset, break; } case 'd': { - uint32_t val, *valp; + uint32_t val =3D 0, *valp; valp =3D va_arg(ap, uint32_t *); copied =3D v9fs_unpack(&val, out_sg, out_num, offset, sizeof(v= al)); + if (copied <=3D 0) { + break; + } if (bswap) { *valp =3D le32_to_cpu(val); } else { @@ -106,9 +112,12 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int = out_num, size_t offset, break; } case 'q': { - uint64_t val, *valp; + uint64_t val =3D 0, *valp; valp =3D va_arg(ap, uint64_t *); copied =3D v9fs_unpack(&val, out_sg, out_num, offset, sizeof(v= al)); + if (copied <=3D 0) { + break; + } if (bswap) { *valp =3D le64_to_cpu(val); } else { --=20 2.45.2.827.g557ae147e6 From nobody Sun Nov 24 01:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1727858416; cv=none; d=zohomail.com; s=zohoarc; b=m9r0NALgOh/ki/g/J2ZFyUwx5LlWgBpWd/TSzvMDo5bLulTLjg642hlDevY0oEtj5/0Gad/eVWh10L+R08WKhy6f3PWBX109at4EpmztWG328bqsKlvAGppTNDud4n9Y4HyQ/7A1mr7pi7XKQcnQ6KmuCyWcN0d0L/hYv3WlbE8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727858416; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mVvlpzifK/oFPsb1lZB/F7EDF/ofNvPrMCS+ebNt03Q=; b=ly5VOVPFIXTfzcDVaQsk1/7rsPx1VYg5GwwKI6yFaLMrMW2ea1ivdg7xtWWteBYm3MhtrheYu86PTSte2w4Aq+W5aXhN2bG01YZ9X4tUuzOdCfLPq5gHbQW57FpyqnzjPU8sqcA2pIz+cYEWycpNWYVWnHqBT9ASnKDZrQsVGPI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727858416667711.9370572139196; Wed, 2 Oct 2024 01:40:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svusr-00053N-7d; Wed, 02 Oct 2024 04:38:57 -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 1svusc-0004PG-61 for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svusa-0005nS-Jl for qemu-devel@nongnu.org; Wed, 02 Oct 2024 04:38:41 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-489-Rv7oUskWN0a7DLFzSXfYpw-1; Wed, 02 Oct 2024 04:38:37 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D2A78195609E; Wed, 2 Oct 2024 08:38:35 +0000 (UTC) Received: from localhost (unknown [10.39.208.36]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A24E819560A2; Wed, 2 Oct 2024 08:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727858319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mVvlpzifK/oFPsb1lZB/F7EDF/ofNvPrMCS+ebNt03Q=; b=dHofhzJDIxZElfLf+4qys9WXaMMC+7E5Lx2VQ9iGvOeswQK2Rhid7lCgFFscxZilcJHqyW FPIupP/k8fF0xgIRTxDQMKoZ0LlvrDwF3D3kQDHCZOcJhbMo7HJ7hh/+1UdNK69kMCuoM3 UkD6kuGGf80/z3Znd4+M28JfzoatdtI= X-MC-Unique: Rv7oUskWN0a7DLFzSXfYpw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost Subject: [PULL 22/22] qom/object: fix -Werror=maybe-uninitialized Date: Wed, 2 Oct 2024 12:36:45 +0400 Message-ID: <20241002083646.2893078-23-marcandre.lureau@redhat.com> In-Reply-To: <20241002083646.2893078-1-marcandre.lureau@redhat.com> References: <20241002083646.2893078-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1727858417117116600 From: Marc-Andr=C3=A9 Lureau object_resolve_path_type() sets *ambiguousp only when it is. Fixes: 81c48dd79655 (hw/i386/acpi: Add object_resolve_type_unambiguous to i= mprove modularity) Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 28c5b66eab..d3d3003541 100644 --- a/qom/object.c +++ b/qom/object.c @@ -2226,7 +2226,7 @@ Object *object_resolve_path_at(Object *parent, const = char *path) =20 Object *object_resolve_type_unambiguous(const char *typename, Error **errp) { - bool ambig; + bool ambig =3D false; Object *o =3D object_resolve_path_type("", typename, &ambig); =20 if (ambig) { --=20 2.45.2.827.g557ae147e6