From patchwork Thu Jul 20 15:04:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 108359 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2254763qge; Thu, 20 Jul 2017 08:08:03 -0700 (PDT) X-Received: by 10.200.3.43 with SMTP id q43mr4964029qtg.130.1500563283135; Thu, 20 Jul 2017 08:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500563283; cv=none; d=google.com; s=arc-20160816; b=CXMXbu5AcEK+0vHvBG3RZnq8cNmDK+YTVQPToT1MfkmQu3rlgwKGl8lFSp+xr3qpr7 ljiA7qOnP/3cUgAbgpCVcjv436prCrZLyBNeCdvVynpBZ/P2LSvRZQGuPr6bKDM424vN MW6vsTxOG4udNvJT+9XUSS4A2Wtv/7mLYCwyZ1WVBPsnHltSktoxEhTjcgPNbN946plJ mU2Y6nZDEjOd8Vd7VFn72kZPDYPHD9nLYrm8sD4nhUppgn2usj2wyS6gR6Q00XnmM1Bd QGBHAIEj1kt5KWgv0ZxIlLJPUl/6PpO1t9awxOlMGQzz26zKC4AN//4yI/SrQhSwYbNN I/qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=Ccr8EQdnNfCesb8xiulgZhA3zMCySz8FlRKyoGnAheI=; b=d8K/vYUZd+5962KeCYRStMrPQubYHuXBzcYdhYw7dgQRi1b4FUIA69BFE9/MAKWoZv 1SasH/GHraaKISY7LmUVqsKvIH4p8m62mRrAaMl/HPA2WxG91VaMq5mK06WddXYU2p30 g0WUYZdCGJEJP+gILi0tINs6DyETTd+eXBN8S3wvxT1ejbnZxXGIaxcMx0t3iX8VBXYO VFQ1vCeBzwg1dyUFirDSU5kJarGDRAggzj8geMCMmiA2kIwDc+E5KawtHDUV05saabUf vHR+v56nGVsGMiP9WByQuFVv74iDVLckDyD1d7wO4U7/nSShmxfox9VfKBTedsb0A7Bf vQYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=V2eLPx6g; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t123si2026589qkh.102.2017.07.20.08.08.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 20 Jul 2017 08:08:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.b=V2eLPx6g; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYD3Y-0006nB-Io for patch@linaro.org; Thu, 20 Jul 2017 11:08:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYD0I-0004G4-5W for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:04:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYD0H-0007ms-5q for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:04:38 -0400 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]:34766) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYD0G-0007ky-WD for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:04:37 -0400 Received: by mail-wr0-x231.google.com with SMTP id 12so72092107wrb.1 for ; Thu, 20 Jul 2017 08:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ccr8EQdnNfCesb8xiulgZhA3zMCySz8FlRKyoGnAheI=; b=V2eLPx6gwjhxxHjEMo//8wjxCWGYCFpWEpfk3LkZ2B+7g8mYXnUkqFkLsRLELkWEuP bTm0QMrbO4VtGKD8fCyFnODWcEP6iMFN9XEILtmr1OAGigiZFQLKJEByOGBbaOQQm32t ONxABsVIaBu+rGtZpvxMUkCiBWWG2+8I4qS5I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ccr8EQdnNfCesb8xiulgZhA3zMCySz8FlRKyoGnAheI=; b=ckfZD8mJSc4RjwVBXAzuEuzNBMLyXbQzcjogDAf6ME858RFaHFoaUOH4LyIFJXBLHz PS+kX+hT2vuYq5lFeK53pcAltLKHtF2vEqPTLeJspnnFQ4c7y/wyXCgtOIQsVqCB1N9i 0WjaGrXFBfgRk36o7GWQaQcqehK2VJi18na8g7t9KMMNuHeslg6unc9d7/iB3RtgESWJ F2ip7zuyRoBNqUN1WZBz91G99SE8oBBW8T4is2CcrcI9TDqA8qKgmWdc4iJZczIa7Ddl 8LdNgz3PP2EAqUv5SVFUBEVtyUS1HLeuzSI8qBdtGgTBEGRO2QvTBU/DxvY29A1lZMrL 8W4Q== X-Gm-Message-State: AIVw113yrN+yazW8zcQprIucaCCI4bpwwB1FoRE8IHrpEG/WOpaLZkrk Qm/qE2kAubCuGhNk X-Received: by 10.223.179.27 with SMTP id j27mr1663019wrd.190.1500563075914; Thu, 20 Jul 2017 08:04:35 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b80sm2711527wmf.10.2017.07.20.08.04.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jul 2017 08:04:33 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D2F6D3E04F1; Thu, 20 Jul 2017 16:04:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 20 Jul 2017 16:04:09 +0100 Message-Id: <20170720150426.12393-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170720150426.12393-1-alex.bennee@linaro.org> References: <20170720150426.12393-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::231 Subject: [Qemu-devel] [RFC PATCH for 2.11 06/23] softfloat3c: silence compiler warning 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: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Aurelien Jarno , rth@twiddle.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" While you could pass a 0 size_words to the function it would be a bug. At least by ensuring the leg is followed it stops the compiler complaining about a potential uninitialised access. Signed-off-by: Alex Bennée --- fpu/softfloat3c/s_shiftRightJamM.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.13.0 diff --git a/fpu/softfloat3c/s_shiftRightJamM.c b/fpu/softfloat3c/s_shiftRightJamM.c index 47ba5ddaf9..035d5d3c1f 100644 --- a/fpu/softfloat3c/s_shiftRightJamM.c +++ b/fpu/softfloat3c/s_shiftRightJamM.c @@ -66,7 +66,7 @@ void } while ( i ); ptr = zPtr; } - if ( wordDist < size_words ) { + if ( wordDist <= size_words ) { aPtr += indexMultiwordHiBut( size_words, wordDist ); innerDist = dist & 31; if ( innerDist ) {