From nobody Tue Feb 10 00:57:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488654071638326.226680006225; Sat, 4 Mar 2017 11:01:11 -0800 (PST) Received: from localhost ([::1]:36303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckEvW-0000Ub-8p for importer@patchew.org; Sat, 04 Mar 2017 14:01:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckErt-0006jw-CA for qemu-devel@nongnu.org; Sat, 04 Mar 2017 13:57:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckErq-0008A9-AF for qemu-devel@nongnu.org; Sat, 04 Mar 2017 13:57:25 -0500 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:35549) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckErq-0008A1-6F for qemu-devel@nongnu.org; Sat, 04 Mar 2017 13:57:22 -0500 Received: by mail-qk0-x241.google.com with SMTP id n127so35021506qkf.2 for ; Sat, 04 Mar 2017 10:57:22 -0800 (PST) Received: from yoga.lan ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id k8sm10048006qke.54.2017.03.04.10.57.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2017 10:57:20 -0800 (PST) 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=+5B40VakQzH/npqj/ZH8G8pC+QMY2u8Mh7U71XsFK5Y=; b=ktfdAF4BPu02oHm8uviaTJdiHnaWh1RVs79ib3MzPE1f57NVql1FA/1xlVml1Spn68 a0ui/xcKdST6qSaONZp61EUBZ7PZTfi0DtEiF6JPKxcuBVM1EOQ/10TZCp/dVAwZIv9o QnxYmqTFns7E3fqAtH0dtfs9shOgPZ1FgJ8/6WnD0Ycagxt9kzww1HXvbx7+BHzbUX5m +uTy78khLivYn7RxFPPrMSBceojm5pCkJgpE8dMw3t4+lX513YJ2ka+K1IP78RIV0J5T 0TwDSBlfet1q3imG9Y8hNXi6YEKSgcs/2Hcfms9tPIh969fD6f5hoMRvIgmoG6jr4VRz x/Xg== 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=+5B40VakQzH/npqj/ZH8G8pC+QMY2u8Mh7U71XsFK5Y=; b=KrLaoeqvqTYNFha2PqXeN7oE+UfbpHj8oZIbFyQ2YHmBPElozuvIdnxtS/edNjoFZf LUp8Vq+1r4JFrm85t/pY8E8Jt2y/TTwX3LTcJiik7UoEE8Seg11Ek+7e84MyfGu4WWWM rVmtXSWAbJCfGyZRRRgjeOY7F2D7xTxm2jUuuTEU87152g73SZg0amZifCQEC+OJ2G/A ZmLDrU53wS95E+XkyLvrZQx/pj5k8hIomot51az825+mvUSc7DnVfmtkx2dVdCc1x2Lm sZlwMjq5rNE10x+qWNP8bVwLoeeekxS4fgmCtZGSUKxu7qGFOxm6N6xqYS3mVD4Xbp2+ 6l9Q== X-Gm-Message-State: AMke39nHHRE4rqfzmfbkwr9tyOfmalzWwWXMnm8GMZwID5GXg4z4J+TkR3+O7S31xBVnJg== X-Received: by 10.55.212.199 with SMTP id s68mr8629047qks.245.1488653841687; Sat, 04 Mar 2017 10:57:21 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Aurelien Jarno , Yongbok Kim Date: Sat, 4 Mar 2017 15:56:48 -0300 Message-Id: <20170304185652.10675-2-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170304185652.10675-1-f4bug@amsat.org> References: <20170304185652.10675-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH 1/5] target-mips: fix compiler warnings (clang 5) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 static code analyzer complain: target/mips/helper.c:453:5: warning: Function call argument is an uninitial= ized value qemu_log_mask(CPU_LOG_MMU, ^~~~~~~~~~~~~~~~~~~~~~~~~~ 'physical' and 'prot' are uninitialized if 'ret' is not TLBRET_MATCH. Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yongbok Kim --- target/mips/helper.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target/mips/helper.c b/target/mips/helper.c index d2e77958fd..e359ca3b44 100644 --- a/target/mips/helper.c +++ b/target/mips/helper.c @@ -450,10 +450,18 @@ int mips_cpu_handle_mmu_fault(CPUState *cs, vaddr add= ress, int rw, access_type =3D ACCESS_INT; ret =3D get_physical_address(env, &physical, &prot, address, rw, access_type); - qemu_log_mask(CPU_LOG_MMU, - "%s address=3D%" VADDR_PRIx " ret %d physical " TARGET_FMT_plx - " prot %d\n", - __func__, address, ret, physical, prot); + switch (ret) { + case TLBRET_MATCH: + qemu_log_mask(CPU_LOG_MMU, + "%s address=3D%" VADDR_PRIx " physical " TARGET_FMT_= plx + " prot %d\n", __func__, address, physical, prot); + break; + default: + qemu_log_mask(CPU_LOG_MMU, + "%s address=3D%" VADDR_PRIx " ret %d\n", __func__, a= ddress, + ret); + break; + } if (ret =3D=3D TLBRET_MATCH) { tlb_set_page(cs, address & TARGET_PAGE_MASK, physical & TARGET_PAGE_MASK, prot | PAGE_EXEC, --=20 2.11.0