From 04694658ad4a7df13a74160864d87ab858a9da53 Mon Sep 17 00:00:00 2001 From: Thomas Weißschuh Date: Thu, 3 Aug 2023 09:28:48 +0200 Subject: tools/nolibc: sys: avoid implicit sign cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getauxval() returns an unsigned long but the overall type of the ternary operator needs to be signed. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau --- tools/include/nolibc/sys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/include') diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index c151533ba8e9..833d6c5e86dc 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)) int getpagesize(void) { - return __sysret(getauxval(AT_PAGESZ) ?: -ENOENT); + return __sysret((int)getauxval(AT_PAGESZ) ?: -ENOENT); } -- cgit v1.2.3