From nobody Mon Feb 9 20:32:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1570036235; cv=none; d=zoho.com; s=zohoarc; b=AHo/QdLL+3EsnEndz+LDF/ZYZ0PBL4vuY0rVfSLtSTQOtpjRETAJkTwiHRQaIypA/vrupm/iMjs4yY5akkD+Bt56FB8/+LUc7J0LJlcJuwhULFqnNHCgEfcXRMbC2WtKyjeSTSXUxPquOe9trfi+3fLl5vnmagbZ7ajwzrq3LHE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570036235; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=SMJwE8Po6gqDcIMCVlLUJtYONx0fpzl7bDQkyAr27WI=; b=ZOXx5fhH8Ly77RnHcFbK4fatsG87W8hH3et6jMrCGw6YmwikvIXBOOHBmFdhXD/Nd93IgZJm5gJ/86Z08tqUvdWKl2oXXQmHYotN+A4zBR7W4o5e35ETis+DFzigBgin6MVmv6RR4dlolAQGGrOg+fqZcpGv3DQNhof7oPzeXY4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1570036235071341.47875490321417; Wed, 2 Oct 2019 10:10:35 -0700 (PDT) Received: from localhost ([::1]:57846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFi91-0000Y6-0D for importer@patchew.org; Wed, 02 Oct 2019 13:10:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35573) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFhrb-0005nd-Lk for qemu-devel@nongnu.org; Wed, 02 Oct 2019 12:52:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFhrZ-0003hQ-I9 for qemu-devel@nongnu.org; Wed, 02 Oct 2019 12:52:31 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:33858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFhrZ-0003g7-CJ for qemu-devel@nongnu.org; Wed, 02 Oct 2019 12:52:29 -0400 Received: by mail-wm1-x343.google.com with SMTP id y135so5359332wmc.1 for ; Wed, 02 Oct 2019 09:52:29 -0700 (PDT) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id g4sm27303990wrw.9.2019.10.02.09.52.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 09:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SMJwE8Po6gqDcIMCVlLUJtYONx0fpzl7bDQkyAr27WI=; b=blNBNqFf318bJBWyTHWJA2SzafzWoZleULzgxSfZ88Ds+FlN8L+E44q7eow97uxLzr XNHra2sSJlN1HeiCVXql5UEyhXbGvqFFFOrNhlpgatc3w/OOlD+Bc/iJOeiZ+iyATMeS 4AZk5NQN2MOlweWpeQEnK87AJJnxqjAj5mHyF/5YWYYlzjPbblRo5Ajx87vy+uz83hg6 475KljAlLAp2WM/iJy9r9kU1KMDw+dkL9sCDAZHpR8JFVGj84qfUFSFDW/BI94RVGY35 beFjL+CzRoTWNbtDXHPUth1TjxK5Ro+WufDoxPqy9hou2S8ZmRzAO3B2jn6qSDQxAZAY HJoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SMJwE8Po6gqDcIMCVlLUJtYONx0fpzl7bDQkyAr27WI=; b=aJoUUFTIw98u/FVXp3N4qOGhkT5mNONQAGHiMeVNhKk05Z1HjAbCqxOpkiMF1ZL3MH RqX97edD+QK406mSXnNfRotDU2RCbXovot20lRGqrdQ6DWSHlY+a7ZVUbXt6BOpClgut jmFE/rvS25XPQPFrFzQkr9tOYIh4oSPGeVp5hqimzTJs4yeBw27ODuPe9PnyNgll6gCr l3vDHTvrERI6GqMk/NlA5mMRGLFz1PngocxX4dmmlxq0x+9+BQ8fAlZ36dAcKkFWKeR/ LbZL9PzlbxQlP5XLg6iqdLLOrsQWQNoRAmwzXWjo/FkjVaw7X90W72Exq746lop+jM4+ ZUXQ== X-Gm-Message-State: APjAAAVQk9iSbURxqq3WziDUw+xpBRbHfLGxSixTyTids6xjRzvjNgzB RO0Ziqddfel1Hn/i3F7AcW+Uw5LI X-Google-Smtp-Source: APXvYqyVti6vP2kaz+LWY7933E/mmK8a89v1hV4ivrNDUh7DFBdld0eC992dsHJPVqAQlBuhsF5ALw== X-Received: by 2002:a1c:2d44:: with SMTP id t65mr3647412wmt.12.1570035148081; Wed, 02 Oct 2019 09:52:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 30/30] accel/kvm: ensure ret always set Date: Wed, 2 Oct 2019 18:51:53 +0200 Message-Id: <1570035113-56848-31-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1570035113-56848-1-git-send-email-pbonzini@redhat.com> References: <1570035113-56848-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Alex Benn=C3=A9e Some of the cross compilers rightly complain there are cases where ret may not be set. 0 seems to be the reasonable default unless particular slot explicitly returns -1. Signed-off-by: Alex Benn=C3=A9e Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index aabe097..d2d96d7 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -712,11 +712,11 @@ static int kvm_physical_log_clear(KVMMemoryListener *= kml, KVMState *s =3D kvm_state; uint64_t start, size, offset, count; KVMSlot *mem; - int ret, i; + int ret =3D 0, i; =20 if (!s->manual_dirty_log_protect) { /* No need to do explicit clear */ - return 0; + return ret; } =20 start =3D section->offset_within_address_space; @@ -724,7 +724,7 @@ static int kvm_physical_log_clear(KVMMemoryListener *km= l, =20 if (!size) { /* Nothing more we can do... */ - return 0; + return ret; } =20 kvm_slots_lock(kml); --=20 1.8.3.1