From patchwork Wed Mar 8 16:57:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 660449 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp432365wrb; Wed, 8 Mar 2023 09:02:06 -0800 (PST) X-Google-Smtp-Source: AK7set+KQnq/EW5btRZtb7kFanD9KaYLvPvqAs2OovAABQMgcHo0xIX2GgjFQNWHINsu7G2jlHf1 X-Received: by 2002:a05:7500:5c0e:b0:fb:307a:8238 with SMTP id fd14-20020a0575005c0e00b000fb307a8238mr139846gab.7.1678294925909; Wed, 08 Mar 2023 09:02:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678294925; cv=none; d=google.com; s=arc-20160816; b=iUnKJ4dyKFFpXw9wUJWz5bTUJuGTwKuCXKqOgUvqTWREX1EhTsAI9Q5mhkQsFhXYJr SCGAHDRv/MtFfxWkOgI+4XigTNm55WswsYtuJbpxssigoBBTJN2iQyIVtDjO2B1tDSS3 1ZTT++QvbkMgEHMsusneEfQeQ/kSguf/tuS3Yt5PpGkSFL7pE7olRtUya45ne5J2AblK Its7XYKZfmH9sJ3WExxXzBNxS6r00DGfNUykgsDzt2g50wMUFpp26wkAlwQG6AmdCvWP yvUksD1JWeBGvXYrEdo+H8biii+SANfAuT7ciwNvWiZ6T+ZSAb1tPjsV9VscCBZfW8EB U6Gg== 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; bh=C9oh772rQEZ5srk0NgDy7YaWCrMOspIZCWnIddr07Yc=; b=H7qn4rMEfWmuygv8zPJEvhurdJfnY2ZRYxtZee5h1NmCcKjyeI5TsnkEpuMzPRW3rP OvlaXAPjnD2d7Wd5jUJKv2H5zlK9QjVc1TPMzhN02qTqstsgjc88mf9oIYrHv8jHJpUz CPy3JvU+A/pRdiijb4gnEs2pE17Q8si1FZaB7xIHo+z/NW1KsGc6e3ZlCLRCk79rhiXH 3zPa9E1ucUFdvg2fQRHu53zrKnPl1/ItkMN6Z8ovRdUx+o25YkgE620l4SzpqRFb+Tbc qFG0exEqXfIsCTIiFJG2tBKvkHL/gyXejhk2sSGQ0DfhUgrai/9c8vSqYzxC5xxaiCIO lcWw== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v195-20020a1f2fcc000000b0042d799dc970si856819vkv.160.2023.03.08.09.02.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Mar 2023 09:02:05 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZx8l-0004zV-US; Wed, 08 Mar 2023 11:59:48 -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 1pZx8a-0004s7-4b; Wed, 08 Mar 2023 11:59:36 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZx8Y-0004BO-GW; Wed, 08 Mar 2023 11:59:35 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id BE75E40112; Wed, 8 Mar 2023 19:58:58 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 8D0C913A; Wed, 8 Mar 2023 19:58:57 +0300 (MSK) Received: (nullmailer pid 2098387 invoked by uid 1000); Wed, 08 Mar 2023 16:58:55 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Michael Tokarev Subject: [PATCH 46/47] tests/tcg: fix unused variable in linux-test Date: Wed, 8 Mar 2023 19:57:49 +0300 Message-Id: <20230308165815.2098148-46-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230308165035.2097594-1-mjt@msgid.tls.msk.ru> References: <20230308165035.2097594-1-mjt@msgid.tls.msk.ru> MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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 From: Alex Bennée 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> (cherry picked from commit 2bc6c79417b89c3306b724577e775f03fe61fb2e) Signed-off-by: Michael Tokarev --- 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; + } } } }