[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220719214449.2520-3-w@1wt.eu>
Date: Tue, 19 Jul 2022 23:44:33 +0200
From: Willy Tarreau <w@....eu>
To: "Paul E . McKenney" <paulmck@...nel.org>
Cc: Pranith Kumar <bobby.prani@...il.com>,
Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>,
Ammar Faizi <ammarfaizi2@...weeb.org>,
David Laight <David.Laight@...LAB.COM>,
Mark Brown <broonie@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, Willy Tarreau <w@....eu>
Subject: [PATCH 02/17] tools/nolibc: fix build warning in sys_mmap() when my_syscall6 is not defined
We return -ENOSYS when there's no syscall6() operation, but we must cast
it to void* to avoid a warning.
Signed-off-by: Willy Tarreau <w@....eu>
---
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 08491070387b..b8c96878c9ce 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -692,7 +692,7 @@ void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd,
{
#ifndef my_syscall6
/* Function not implemented. */
- return -ENOSYS;
+ return (void *)-ENOSYS;
#else
int n;
--
2.17.5
Powered by blists - more mailing lists