Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1897283rwo; Thu, 3 Aug 2023 01:11:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHsg3WJor7rSzPP1LLKhywWK7L2fs9L1FoI8EPpMScUNEkxflN/lOxLkPBVy3peU9MuoLO4 X-Received: by 2002:a05:6a00:17a8:b0:64d:42b9:6895 with SMTP id s40-20020a056a0017a800b0064d42b96895mr27040948pfg.5.1691050291183; Thu, 03 Aug 2023 01:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691050291; cv=none; d=google.com; s=arc-20160816; b=ajSYN24fcbM24tZfWqyVS5QQO3qObZAiF+PJVhkfsA3KS1n9WN/VVc+1vAcXdvKGlL 4TsyM4Il1SkYbXZ69B/hN5/gYiNCMpNq0dKUa6+F6zSNOWDAf8Cs71UetB7AyDtmZDzq gGbS2fiQVCFRc2jLOBVc7AZxegC3iqP03M8eH6Y0E/Ha1cpSg3I+3DetvAkvE02SiG/K TEUdgIhbNT49QcqLeL/x7kmNBLbBbNuEZsgmWPvo6ysoZ+Qcc46IfOy+mwXD9DTWKLQ3 C9bgWSKhjkkPHDK3W4l89vpbR73vIYucNeZgth35vPA+bfOiPrOPxGwy6Dgt6NfFVpJS eTlQ== 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=qxqZl5+ySp1g0dyoRBVnM+lVu74AF28hyBH5zvvO+r8=; fh=UZfhiU2pgwvZdBOe9fFEhnfTQX0/6KsvXKQubWsfhik=; b=eH4LmN+9NoRRG+7Vx0JA538vRk7ouyvA0L6wEXU+fD4uIbrgUToS9XN2GvKpFm1SlH /cFwA5lmmRjIZ/6i1UU92zTrueZfP7KCJMiiNrQfERgDYEQRusqBEFi127JXMYsgDLa9 HL6sgnHay+SMPS5xFDByD+dXFGHAsxtEUODV+W53llZ4CdEQfO9VyD8AZvp4bW4kAj7E lm6xWaTDirfzpqwwzeDOAOfE0YjyqG+X65xYy4/PAOG1+i5vb1iMtCYEbFuEZdiv6XwQ S2/LzZbVo5s+WjbtNaOPjRb7gInyJlDGZ6O90tjmSYe183i2M7FXSpZzKTWvvY6j0e7P 6qyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=d3oYr9ZK; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a056a0016c900b006829f1e5164si12509434pfc.118.2023.08.03.01.11.19; Thu, 03 Aug 2023 01:11:31 -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=d3oYr9ZK; 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 S233804AbjHCH30 (ORCPT + 99 others); Thu, 3 Aug 2023 03:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232235AbjHCH2y (ORCPT ); Thu, 3 Aug 2023 03:28:54 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A1ED30D5; Thu, 3 Aug 2023 00:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1691047729; bh=K1nxWE0fnm2Rd+ee1CtTMEzoebCOmluJAHtmf4S2JYw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=d3oYr9ZKnj81yRNQs7tguKWRZj+K+kOD9aCvxHPy9sln2oa8ZNdOGxPxAC3ZyE9o8 6amfOuVyomwybMZoLE5XSQ1VpDwXVFPd25so9KO64tXuyJ8IRl6AtVlAgk/KxCT7Ja abX6rrF3TPhctcQVoi5qTqmXXhgxtxC9mIQ2eJgc= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 03 Aug 2023 09:28:49 +0200 Subject: [PATCH v3 05/14] tools/nolibc: stdint: use int for size_t on 32bit MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230803-nolibc-warnings-v3-5-bcc1a096ae02@weissschuh.net> References: <20230803-nolibc-warnings-v3-0-bcc1a096ae02@weissschuh.net> In-Reply-To: <20230803-nolibc-warnings-v3-0-bcc1a096ae02@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Yuan Tan , Zhangjin Wu , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691047727; l=1072; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=K1nxWE0fnm2Rd+ee1CtTMEzoebCOmluJAHtmf4S2JYw=; b=c9Cgu8bto58cOlvZooH2C/yq8ewDPwtBzS6vev6ZRrqlH0do7tsxTiV75lYiOPpWXJvbOhhxV LWNXjln6xFtC8i/+MTZ4YavCk/Ik+vvihxujZIEb8spYbYMEvi9lw+S 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,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Otherwise both gcc and clang may generate warnings about type mismatches: sysroot/mips/include/string.h:12:14: warning: mismatch in argument 1 type of built-in function 'malloc'; expected 'unsigned int' [-Wbuiltin-declaration-mismatch] 12 | static void *malloc(size_t len); | ^~~~~~ Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdint.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/include/nolibc/stdint.h b/tools/include/nolibc/stdint.h index 4b282435a59a..0f390c3028d8 100644 --- a/tools/include/nolibc/stdint.h +++ b/tools/include/nolibc/stdint.h @@ -15,7 +15,11 @@ typedef unsigned int uint32_t; typedef signed int int32_t; typedef unsigned long long uint64_t; typedef signed long long int64_t; +#if __SIZE_WIDTH__ == 64 typedef unsigned long size_t; +#else +typedef unsigned int size_t; +#endif typedef signed long ssize_t; typedef unsigned long uintptr_t; typedef signed long intptr_t; -- 2.41.0