Message ID | 20230801-nolibc-warnings-v2-2-1ba5ca57bd9b@weissschuh.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2457652vqg; Mon, 31 Jul 2023 22:37:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlFmECJRChw4wFvEXHwgB6PctIV35OUCsyBF9ioz6pGyi1h23zKWL2YUX3NdzGAEielT1yY9 X-Received: by 2002:a05:6a00:148e:b0:64f:7a9c:cb15 with SMTP id v14-20020a056a00148e00b0064f7a9ccb15mr14798497pfu.11.1690868252160; Mon, 31 Jul 2023 22:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690868252; cv=none; d=google.com; s=arc-20160816; b=WApW+w2G+OawJOrQ6bPcKL2DMdU4XEK+VFoVGGGSBbKevguoodvBcJXIjZkqAKw4u8 uvTcZMe+H2iMWK/N8aLQbHU8BaM0E8It3rIeEBtSvW1OER0E09zApFhec2OQ04sG1Hbr JQpUMxGXOWdlSeNbDWNGYRqjks8iyW/e7Zp5l/SsLt7aKB53LvKq3TmCblAZgQI0XxKH DJjNk0MvWMOPMnXCB/6iQdcz+Y8Rjn/Tr/Bqnb/xOej6gPb1r9z+NoclO8rgrBmGYi+1 rBlwV24prOGBgRWAeFEbCk3pAty+kqhZrUho5wJhJmZ70kWawV8BRTgZFWqDIlItDzVF vgdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=MMY8hn58VEv/p/BjR19QUJvq0A0iWYJmqgU+PWQ1sXA=; fh=UZfhiU2pgwvZdBOe9fFEhnfTQX0/6KsvXKQubWsfhik=; b=GHbRxcsyQbEkLe6xFXHwLXKg7b6tW2RZAlrN3ttiONHusrXfty5htsjVJjX3sTnxjh THEhZASJ5n4ealFU0m1S6ej4+U/3X80RPw6k0r7ahcoiEXjEcQsUlqZo3ya9sUIh6mrp Hz8WF+T6Fhn8TSBsOBK+U1ZsmIjJP4yfSFB6w+/jxc/4IZnqi2FTODqNqXJxVHL5eya9 KBUf0RgOk+5Q7uWWYMRMfs9pYdKR5EbU/dHJJlHSc9yAj0jNQUk81OquRRLtRAMIqGbV 9eklNnJW4HJwQWf+dc8+lPU9CuOMQ22cZQ9to6O7VMlNeM00gfpRi8fjtwRm/pL28hVG BOnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=bxqjKiZq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j64-20020a638b43000000b00563fcef8e13si8319023pge.107.2023.07.31.22.37.18; Mon, 31 Jul 2023 22:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=bxqjKiZq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbjHAFaW (ORCPT <rfc822;maxi.paulin@gmail.com> + 99 others); Tue, 1 Aug 2023 01:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbjHAFaS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Aug 2023 01:30:18 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FC7E1FC8; Mon, 31 Jul 2023 22:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1690867812; bh=9JcxE/sRcogPp0X3mpqUzzaMeZv7ua9TZds5/yNngTc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=bxqjKiZq2c9Jtsp+M1m02PFTibkb0pfk/Kp2mOnDkA0C9DQG7xI0hO3umOgBwTgo1 Xebk3FyJsTz6vrYb4/PZJPxGpDHWI5XlHkt7GVNTUMPJsyilyYr+Q4zt+sUneBCbSW fTW+3q/Ntk2am8fnyWjDSTsDYu//KGf7ZrFHMDQk= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> Date: Tue, 01 Aug 2023 07:30:09 +0200 Subject: [PATCH v2 02/10] tools/nolibc: sys: avoid implicit sign cast MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230801-nolibc-warnings-v2-2-1ba5ca57bd9b@weissschuh.net> References: <20230801-nolibc-warnings-v2-0-1ba5ca57bd9b@weissschuh.net> In-Reply-To: <20230801-nolibc-warnings-v2-0-1ba5ca57bd9b@weissschuh.net> To: Willy Tarreau <w@1wt.eu>, Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Yuan Tan <tanyuan@tinylab.org>, Zhangjin Wu <falcon@tinylab.org>, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1690867811; l=704; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=9JcxE/sRcogPp0X3mpqUzzaMeZv7ua9TZds5/yNngTc=; b=pDCw8ZJtjbVkmrXmNV1kxMUun7xzLlpXVsSxJJLeAbQtZE/iBEkEZgIPjqXWPbJC49X9Or75F SGWD4IbaZcKBAq5SY9G6Uam5wrMHWvW0QOPmRsSL8w8Gg5odi2eS61h X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_PASS,T_SCC_BODY_TEXT_LINE, T_SPF_HELO_TEMPERROR,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773003868203751515 X-GMAIL-MSGID: 1773003868203751515 |
Series |
tools/nolibc: enable compiler warnings
|
|
Commit Message
Thomas Weißschuh
Aug. 1, 2023, 5:30 a.m. UTC
getauxval() returns an unsigned long but the overall type of the ternary
operator needs to be signed.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
tools/include/nolibc/sys.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 889ccf5f0d56..2c5d9b06acf5 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -466,7 +466,7 @@ static unsigned long getauxval(unsigned long key); static __attribute__((unused)) long getpagesize(void) { - return __sysret(getauxval(AT_PAGESZ) ?: -ENOENT); + return __sysret((long)getauxval(AT_PAGESZ) ?: -ENOENT); }