From: Thomas Weißschuh Date: Thu, 3 Aug 2023 07:28:48 +0000 (+0200) Subject: tools/nolibc: sys: avoid implicit sign cast X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=04694658ad4a7df13a74160864d87ab858a9da53;p=linux.git tools/nolibc: sys: avoid implicit sign cast 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 --- diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index c151533ba8e91..833d6c5e86dc1 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); }