From patchwork Wed Dec 21 07:42:50 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: 635605 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3369780pvb; Tue, 20 Dec 2022 23:43:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXsYXb7t3EFmrO7m6CFZ7BlHCWFW3e4zcLvdNhlzo4TLI+kTHGVLXj/axzDC1nUgHznQGBX1 X-Received: by 2002:ac8:4f53:0:b0:3a7:e02e:7cc4 with SMTP id i19-20020ac84f53000000b003a7e02e7cc4mr872801qtw.32.1671608632789; Tue, 20 Dec 2022 23:43:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671608632; cv=none; d=google.com; s=arc-20160816; b=ro6zIanTyyXicm4whXfYx+O0cZ/nMENyfsn0wV8GDn5y0S0hvGvHYGULGitUQyvAhF rrpN7DjoFm3EnpOxIB/BfL65FHvBEod8tgXuQXTQwwaGG2qvWge5AUmaXqisjJ9C2ydp TDMMZgJEx1Oj+yQHNRQ7wnRyNnUgYgSKgiPAsQPMh0wJbZwJSuVYiTqc+wM+Am6jhVN/ Pbx5tSLlFRHXL9n+SyTFy3L5yGF4r/CAlu9x6ztF8FBxB/kB8rWstH/3wSaaXLlMSb3s /qai5A6sILUwSnIZQJRKATdFhzcqvSFDYZMjbOdIEzURDIYXhh1Cbm9eQFZmmaWYW7g4 D2/g== 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=ujqOu9LAFcDMI2dgF/jFRywqQ9U0k5ocepP0dpj1IqyoLbFAdW4kPKGPqE8U6wzOH0 SG8x+Pk13P4tlj9ObxhxlYRE74Ez/IK/jXD990H2Vrf7whUmLMOcf7yJR6JxpoYfUwI4 6qCXca5H6Gyer/VJQS2soTMsRifA4DImyrylC+V8hiVj5ZKYMub+2NVf2+M+FZV3vOLv HjcxpoiwOF1gnafF5UrxvnHvj7r37FBDyRxcfkeOgbkPGOm0fANUDukFwZ5bk813fA1D lCxneZ7k5Qd98+hYxSgdTZn8eu1US45EVPdY92HxlPkUT44Hv6saW/9yDs9bmOiPy3cr sMFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=icPi5z68; 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 fz15-20020a05622a5a8f00b003a50d917ea5si4586944qtb.540.2022.12.20.23.43.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Dec 2022 23:43:52 -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=icPi5z68; 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 1p7tko-00070d-Tu; Wed, 21 Dec 2022 02:43:08 -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 1p7tkg-0006zt-Ao for qemu-devel@nongnu.org; Wed, 21 Dec 2022 02:42:58 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7tke-00048m-Oj for qemu-devel@nongnu.org; Wed, 21 Dec 2022 02:42:58 -0500 Received: by mail-wr1-x429.google.com with SMTP id w15so14036819wrl.9 for ; Tue, 20 Dec 2022 23:42:56 -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=icPi5z68TEE0JNAzOOB4+LLMgx+zGcT79ND3LTALsFoNIdZ4Iy2+rJGJOOLVJkSDYz v4prhhnOzfbudk+j5fXdwMFIhOW6X8fs1VQOpAc4Zl6SdJEd+RmZ3eQ/4a/hxlQovaQn FFGnh1EtI2nx08gfnFIqoStrjbDlFMs4qav1ig4mBlueYMHCc9X+QqdRMmLX4WRYGh2d POiRYLq75yCrzj4bxc+q1sLzaLK0UA5ACVfLhL5QLCG00yGE0+W4+roMrHX52wQwrh+1 Og4ajYVgV1m4JaDChx1a39MwCEBhMW4KrPuWu/dYW7h8Gb8DKODNVET+STKLDpA1lz8y vMiw== 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=JclC1VPOsombZdTdzKnaz6/qmjoRd4X+5NYhhBtZeAvD7vBgi+adSIO6+HAEI0NfwF 00JWmBlPWfDCb506T6mzmuVvUDb6+3e2EobvbMksDvnFYjAmqqEPWnxydf1l50uC6B4W HrL8KdLd1z4ihRAUuQcZeBBaaODDYiRt0LduNFzG5bf0YE/0dRPxOcN0mlw5QJxk6lVa MQ/lF4XiKWIu9eUo+iCJmT/2vrZny7pEqNih5+Og1sBNdBX7+sFcnnGgUtELF6WVTUn/ P9Rtr+3eysiU03/rQJs9cWIo1e+4nOTJSitMUmfHmvRyEAd6+OlFgiavj4xa7anoFS5f 3UcQ== X-Gm-Message-State: AFqh2krsv3szRb2Eb5UeZTpa2YWYWj81l9WILzTZsk0X8uqieBg7bqg7 Smxb3bAggGBE6Ek+/DlYSI/3tpKP+GJGE25T X-Received: by 2002:adf:eb4f:0:b0:242:659c:dc7 with SMTP id u15-20020adfeb4f000000b00242659c0dc7mr394592wrn.61.1671608575237; Tue, 20 Dec 2022 23:42:55 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id w12-20020a05600018cc00b002423edd7e50sm14307188wrq.32.2022.12.20.23.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 23:42:53 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BE7701FFBC; Wed, 21 Dec 2022 07:42:52 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Beraldo Leal , Paolo Bonzini , fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Subject: [[PATCH]--edit 4/6] tests/tcg: fix unused variable in linux-test Date: Wed, 21 Dec 2022 07:42:50 +0000 Message-Id: <20221221074252.1962896-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221074252.1962896-1-alex.bennee@linaro.org> References: <20221221074252.1962896-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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; + } } } }