From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17538 invoked from network); 24 May 2023 13:29:05 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 24 May 2023 13:29:05 -0000 Received: (qmail 13893 invoked by uid 550); 24 May 2023 13:29:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 13861 invoked from network); 24 May 2023 13:29:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=message-id:in-reply-to:references:from:date:to: resent-date:resent-from:subject:resent-message-id: resent-to; bh=FYefJmLtKQd5wT0MNlLvzP7C+tiLtwKZpzeBcNlguKo=; b=qdb3wMCpffnOBUX3cWpBrqR58POs+Q/Ht7+shBsrf5ghhJXmbL31oJz3 GLlL+d/Id1O0E5gT3ehbhi8EKjDwD5eURJ4HXjvpZy2Q75QqguZWyNXsx apNCsuad4grOu+mgeklldh6Dj9+aS0J+7ktpHLQnb5WsGOxR2/r5Y9NOj w=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=jens.gustedt@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.00,189,1681164000"; d="scan'208";a="56879518" Message-Id: <580d6560aaf8ed1d7894f881de51a170cfa8ad73.1684922612.git.Jens.Gustedt@inria.fr> In-Reply-To: References: From: Jens Gustedt Date: Sun, 16 Apr 2023 22:41:30 +0200 To: musl@lists.openwall.com Resent-Date: Wed, 24 May 2023 15:28:49 +0200 Resent-From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt Resent-Message-ID: <20230524152849.6f01cdbf@inria.fr> Resent-To: musl@lists.openwall.com Subject: [musl] [C23 implied 1/2] C23: update some legacy function pointers In C23, empty parameter lists loose their meaning as "function that may receive any number of parameters". When compiling with -std=c2x, there were three left-overs in musl that still used that. Change them to use the correct prototype, since it is available at all these places, anyhow. --- src/legacy/ftw.c | 2 +- src/thread/__syscall_cp.c | 4 +++- src/thread/pthread_cancel.c | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/legacy/ftw.c b/src/legacy/ftw.c index e757fc6f..8e9e34d7 100644 --- a/src/legacy/ftw.c +++ b/src/legacy/ftw.c @@ -5,5 +5,5 @@ int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int /* The following cast assumes that calling a function with one * argument more than it needs behaves as expected. This is * actually undefined, but works on all real-world machines. */ - return nftw(path, (int (*)())fn, fd_limit, FTW_PHYS); + return nftw(path, (int (*)(const char *, const struct stat *, int, struct FTW *))fn, fd_limit, FTW_PHYS); } diff --git a/src/thread/__syscall_cp.c b/src/thread/__syscall_cp.c index 42a01674..d0b675e2 100644 --- a/src/thread/__syscall_cp.c +++ b/src/thread/__syscall_cp.c @@ -1,7 +1,9 @@ #include "pthread_impl.h" #include "syscall.h" -hidden long __syscall_cp_c(); +hidden long __syscall_cp_c(syscall_arg_t nr, + syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, + syscall_arg_t x, syscall_arg_t y, syscall_arg_t z); static long sccp(syscall_arg_t nr, syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, diff --git a/src/thread/pthread_cancel.c b/src/thread/pthread_cancel.c index 139a6fc8..2b8a8a76 100644 --- a/src/thread/pthread_cancel.c +++ b/src/thread/pthread_cancel.c @@ -3,7 +3,7 @@ #include "pthread_impl.h" #include "syscall.h" -hidden long __cancel(), __syscall_cp_asm(), __syscall_cp_c(); +hidden long __cancel(); long __cancel() { @@ -14,10 +14,14 @@ long __cancel() return -ECANCELED; } -long __syscall_cp_asm(volatile void *, syscall_arg_t, +hidden long __syscall_cp_asm(volatile void *, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t); +hidden long __syscall_cp_c(syscall_arg_t, + syscall_arg_t, syscall_arg_t, syscall_arg_t, + syscall_arg_t, syscall_arg_t, syscall_arg_t); + long __syscall_cp_c(syscall_arg_t nr, syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, syscall_arg_t x, syscall_arg_t y, syscall_arg_t z) -- 2.34.1