From patchwork Wed Dec 21 14:40:17 2022 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: 635635 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3549073pvb; Wed, 21 Dec 2022 06:42:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXvOCOAug+71PPUrd6uhNAffUTfE4G/0h0A01GPe/jiBD2hDVWzgpSseSjIuv4bA//tusZ/+ X-Received: by 2002:a05:6214:1fd8:b0:51f:3ce9:3911 with SMTP id jh24-20020a0562141fd800b0051f3ce93911mr2867117qvb.26.1671633742766; Wed, 21 Dec 2022 06:42:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671633742; cv=none; d=google.com; s=arc-20160816; b=aGnDoklzZJpm47P+gagBMNhVUL17iNfpQYaYRWek5FS5nWRMM164osQQER5MpX8rsY nul69HPvnorrAqnwNmInxVDrJ1TwaXFIU++udjO75aB1Takewlv1uwcFsIBoRmAL7t3s 6LXcPZ5P2/O1EQeY8j+xgbuBkorW7GncU4S+fra6w6BiYR0O6pgY95WoMphfNB5sz3+5 Fub8uGu7XelnY6+kHlH5PLTj/zPcLeRmgaod24GcRcut4r/5palG8gQdvZ1i2l5hxPmw cNRi+tYyodecehL2CntoNoze17zLPro4jKO5fErteM4Uga32zYBXkINge4PYUsWDgYLo MMoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3E08cP9uQJJb13y/tK6ptN3WodIQyLPwxmDugVOqWPI=; b=blhjFnC3hnWCz7UQAGLteoTgGIpld4P8wnIEKPpX9T6R9lgmT0UuEw/3me/OOWZfO0 WTzHx3M1k1e+b8hzKxcMfz4lKwoVcRDEAia7ZqpMm5mBVBeXIrGRsd/gX9//KNBN4A72 h71085O3V6kjRFrKOtJhj4CNgW5kgx1ckU3RsAp3H5Pt9rrltQSvZLlDWF4e4ndsY2/u T35RufRnutu2nqIryZMZZMcGTMQefTGt+UgcTFvUBk28Nto+ZzXaHvJLPuOlnt5+Ge91 Hu+cVtvLt/2nseyxD4z/ubojolfzxlE2ioigCnQHu30pCKl0A40jsQWSonzVxnNfJxob d1KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sEuYNfm8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id gv5-20020a056214262500b004bb62e51dfdsi6299633qvb.538.2022.12.21.06.42.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Dec 2022 06:42:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sEuYNfm8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p80Gm-0006vs-DZ; Wed, 21 Dec 2022 09:40:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p80Gg-0006v6-6r for qemu-devel@nongnu.org; Wed, 21 Dec 2022 09:40:26 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p80Ge-0004u1-Ic for qemu-devel@nongnu.org; Wed, 21 Dec 2022 09:40:25 -0500 Received: by mail-wr1-x42f.google.com with SMTP id m14so15144341wrh.7 for ; Wed, 21 Dec 2022 06:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3E08cP9uQJJb13y/tK6ptN3WodIQyLPwxmDugVOqWPI=; b=sEuYNfm8/SlqxF5//bi/DXEs8e5XgV3tF7jltMyBT+GWf+8uamX6KQaglfQIwPnUn1 nIg98xOdGTAqNvvl7Dn6ZFu0fOKKSEKKJHjX47YxbkTSxx7EZ3ny1RhDEFQaRhLgES9h w9363YAF9H5Z9c+c2+1zV2Goj5NeIHsF6L7pROYTgBm0JB2Rm+IYTyPb8ceyRJrzFeW0 PlBrIaGiJxiQ36W9ZU2ZnoLk4I79Y/aflJe3CORDvp5tJdzcOFgJNj21jaaGSfjuB78k z7G043xHO6F+k7B0cX0z7Ag5suxtN6Yp/Ql/BP1Wwy6/y29F6DZqzfdL+SVp0u/uDbzr mlFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3E08cP9uQJJb13y/tK6ptN3WodIQyLPwxmDugVOqWPI=; b=gXI2z9R2g2+hXxxkWlKIE4gNHGQir75Rlu0vruzz4/znFFNJpT2qyWydtzOuK1f0Xf 5Xxxm+x3UFh2++GB2Ju3P+Ma3myAbwGvRfwa8Glt+oR2Bv5FZ9JYUTfkmrAjlXQ+X+fL gFZ+38eZ1F8nIeTF0mf62SR9lPjGkscmAq+0wAn7y4AxUZS6j8uOjSZ+KPfjRZpaZ76f SlnF5yfmhXg95NvGKjS3N4krx5YZUvB22e3qw+Y8k8S2iILUIWly/YouDyS9KgANiCW0 6tMwGBWfT9cENIWeJakQWGlFypqGoE+Yxjrw2bFMLkBkcKWf6I8Qb3yeKYl7mGXrFZ8g E9Hw== X-Gm-Message-State: AFqh2kq0zp4uwTv5IZEThq4CKa14ULMDXz6HaHK5th6hp7wVo/5GjuhT FBxXR6nfnne47nRLnzw89IZVAg== X-Received: by 2002:adf:f1c9:0:b0:242:1d69:1ba1 with SMTP id z9-20020adff1c9000000b002421d691ba1mr1478462wro.44.1671633622756; Wed, 21 Dec 2022 06:40:22 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id l17-20020a5d5611000000b002424b695f7esm15406171wrv.46.2022.12.21.06.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 06:40:21 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2ABB01FFBC; Wed, 21 Dec 2022 14:40:20 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 4/6] tests/tcg: fix unused variable in linux-test Date: Wed, 21 Dec 2022 14:40:17 +0000 Message-Id: <20221221144019.2149905-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221144019.2149905-1-alex.bennee@linaro.org> References: <20221221144019.2149905-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The latest hexagon compiler picks up that we never consume wcount. Given the name of the #define that rcount checks against is WCOUNT_MAX I figured the check just got missed. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221221090411.1995037-5-alex.bennee@linaro.org> diff --git a/tests/tcg/multiarch/linux/linux-test.c b/tests/tcg/multiarch/linux/linux-test.c index 5a2a4f2258..64f57cb287 100644 --- a/tests/tcg/multiarch/linux/linux-test.c +++ b/tests/tcg/multiarch/linux/linux-test.c @@ -354,13 +354,17 @@ static void test_pipe(void) if (FD_ISSET(fds[0], &rfds)) { chk_error(read(fds[0], &ch, 1)); rcount++; - if (rcount >= WCOUNT_MAX) + if (rcount >= WCOUNT_MAX) { break; + } } if (FD_ISSET(fds[1], &wfds)) { ch = 'a'; chk_error(write(fds[1], &ch, 1)); wcount++; + if (wcount >= WCOUNT_MAX) { + break; + } } } }