From patchwork Wed Dec 21 09:04:09 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: 635614 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3399920pvb; Wed, 21 Dec 2022 01:05:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXuaZwU48jQY4A80/RPL13LN5TbtkKiAEwruUYDMMuBU9nN56nylbwWNpq2IkhUOsnTOxRIi X-Received: by 2002:a0c:e6c2:0:b0:4d7:45fb:f5ac with SMTP id l2-20020a0ce6c2000000b004d745fbf5acmr1308411qvn.23.1671613558120; Wed, 21 Dec 2022 01:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671613558; cv=none; d=google.com; s=arc-20160816; b=Pxnjsb6XVpBwufFfLoHo2GbMtcUH9XvFlKkmT8imjPzh/65T/QC69rcKXXlYrWYuos +KJPeHch9mFGyKHUDvJopjOXL/g9wRtA/+wJTgIhXjA0mdkM6di6NyaPLJZ/mvAQ2QaI aCPFFu6zNAMmbJwOJpD08te0rkqFnqsKdLCAunUmVKNF/4AH/zXOkyvFO+smK39RJQUU cfBp47PWaoUNTinhia7VwX+vjmvlTHa+Z99iuiqhl1jXFf5fhHxAambV4QFEDF4MA+Q/ HGQNiT5iDRfHOzOGZ77/RBGUmJ5a6jNY1+Y9K+h+dNlw2FtjW8+LPG3wfsyG7JCOaoCr FYmg== 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=zn8RE9bkGb5wvE/Wo/L+tyIK7nNLQkZXvyqS6ZelWWU=; b=qMpemWvfIr5Qd2UUpFjNUpzh+2AEfYNK9Hy6FHUcle53tOqFs4JHdwjjc1cmTYci81 x691/Rpmx+i5sey70cDtzswBVbHJDaukUlXg5CRCJwGKefdENO6y1WSg4flNKSDvd55T /laF95zfDeiyNmQ81SW4yczX3LQh7dcbFhPKTIqCjdWwnr5ysMb7ZTtWk9ufy+jfrUo5 66amvoFCDW6KdxzcFdW9qAYtkTBbF4maW3nb26qI/1MWt4fZnak2LUNTIrdCKkEQGRVi 74Qr25/KYxQOIVD1UaKJe1zsMH4/UPsPiaCbFo/e1yVAj938xY/hkbx+jdmW2VMhNN2N 9UJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=czyvMP9g; 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 gw10-20020a0562140f0a00b004c6adf76c02si6278107qvb.370.2022.12.21.01.05.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Dec 2022 01:05:58 -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=czyvMP9g; 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 1p7v1U-00008y-Co; Wed, 21 Dec 2022 04:04:24 -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 1p7v1N-00006p-Py for qemu-devel@nongnu.org; Wed, 21 Dec 2022 04:04:17 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7v1M-0000F2-0l for qemu-devel@nongnu.org; Wed, 21 Dec 2022 04:04:17 -0500 Received: by mail-wr1-x42d.google.com with SMTP id h7so14239231wrs.6 for ; Wed, 21 Dec 2022 01:04:15 -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=zn8RE9bkGb5wvE/Wo/L+tyIK7nNLQkZXvyqS6ZelWWU=; b=czyvMP9gAypZgYJcWCiUyA6/8cCj2u8scAP6hZ/Ehrz0LD81NVpiGkybs7SJZbx2nH 3caOfX+QM4IKzk1F88dYmwlweAN8e7Lofx1DGsVKPL8QMgd+xpjsm+cY/WizhDLl2vsY dq4gSft8XsIltnwGsT2Yp0C1/XO+wCl7LL1YJv6fkTajJUKE0vB4KMmoyc6sHAQeBb1c 4i4Ae+mn/2WV5TBPc4qIOHPykCy/bM+Juqav6xWhtuDi4zuji+zeBLV9Zcp3zvQzOwQF qf3T/ymKsYeq9VuN0CJ5s5e1iKStjO5/SufmyYJF7vk7IZM7oO/7iio8atdLdIch0zqD hUPg== 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=zn8RE9bkGb5wvE/Wo/L+tyIK7nNLQkZXvyqS6ZelWWU=; b=msiVeJcPZI3/vy1USpIdEPNYNa3u6ZJw/VxmgRA24Cn9n3mSvaSVQmMUH4AY8CS1Ee gryLhUU5j06ZREapc5nWloORPYkL4akA1WYz9cjtq6Orpi9zKH03CeVLjOo9MvBTE145 WzzWPFVGfm7TY/e2SvnyU6r35CYjci1kVAEcaeh0Znep7+1kn7PSNZx6h4VWn74QTpLs yjHXFGQ87nsPc8QdIVFuTv/RDJDr6/O3htuEyRomUEuewzRCbwFf/NfpYEcQTXLWbH8p HpMXCDj4hddH0qClpM5ffmXz5+XGVHSBR2WVhQDSPzZv5AHOnf0wywG2tC5y0M/dcj+I qC3g== X-Gm-Message-State: AFqh2kpzokI9zkc6uRYEXZ0ANQ+EuMkVj/uP5mGYN90rwgdtV7rPfNxm 1SppqJTm7VWH7TETvCbUq2/zXw== X-Received: by 2002:adf:e383:0:b0:242:3cb6:36b8 with SMTP id e3-20020adfe383000000b002423cb636b8mr651289wrm.44.1671613454690; Wed, 21 Dec 2022 01:04:14 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id y18-20020a5d4ad2000000b002365cd93d05sm14829885wrs.102.2022.12.21.01.04.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 01:04:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 430851FFBC; Wed, 21 Dec 2022 09:04:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Thomas Huth , Wainer dos Santos Moschetta , fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, Beraldo Leal Subject: [PATCH v2 4/6] tests/tcg: fix unused variable in linux-test Date: Wed, 21 Dec 2022 09:04:09 +0000 Message-Id: <20221221090411.1995037-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221090411.1995037-1-alex.bennee@linaro.org> References: <20221221090411.1995037-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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é --- tests/tcg/multiarch/linux/linux-test.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; + } } } }