From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 71F383858D28; Fri, 19 Jan 2024 14:11:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 71F383858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705673504; bh=OuaZOQ85AvB1XMElBtaq6bU1GJqIbtp+eJUj8pGXLBM=; h=From:To:Subject:Date:From; b=EXkN/jEio0nuRo5xr3FVF97oHzeyVNc08rCOgsAdFFRwZ756FeWq+9G3WG31qllJm roT4+x5kn1YO7z0ZBSdn/hhysR+ZPbQQ5Vta67WknEbggn/ozvFk1ZNFofHlFI35O1 qZfTrNA4PPupr5J8/me/RmN3nGefcu6FCLAKBYos= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: remove warnings from testsuite build X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 47f079b98e46792c776dbea230d92a6dfc1d428f X-Git-Newrev: 3f2d03a78014a7351ccce1732d9d9a3a45637584 Message-Id: <20240119141144.71F383858D28@sourceware.org> Date: Fri, 19 Jan 2024 14:11:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D3f2d03a7801= 4a7351ccce1732d9d9a3a45637584 commit 3f2d03a78014a7351ccce1732d9d9a3a45637584 Author: Corinna Vinschen AuthorDate: Fri Jan 19 15:11:32 2024 +0100 Commit: Corinna Vinschen CommitDate: Fri Jan 19 15:11:32 2024 +0100 Cygwin: remove warnings from testsuite build =20 - drop unused variable - remove deprectated usage of std::pointer_to_unary_function. =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/testsuite/cygrun.c | 1 - winsup/testsuite/winsup.api/cygload.cc | 9 +++------ winsup/testsuite/winsup.api/cygload.h | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/winsup/testsuite/cygrun.c b/winsup/testsuite/cygrun.c index 450201342afd..50c51876ed31 100644 --- a/winsup/testsuite/cygrun.c +++ b/winsup/testsuite/cygrun.c @@ -22,7 +22,6 @@ main (int argc, char **argv) PROCESS_INFORMATION pi; DWORD res; DWORD ec =3D 1; - char *p; DWORD timeout =3D 60 * 1000; =20 if (argc < 2) diff --git a/winsup/testsuite/winsup.api/cygload.cc b/winsup/testsuite/wins= up.api/cygload.cc index f5ca8db9a181..afd3ee90fc7c 100644 --- a/winsup/testsuite/winsup.api/cygload.cc +++ b/winsup/testsuite/winsup.api/cygload.cc @@ -597,12 +597,9 @@ main (int argc, char *argv[]) } =20 // And signal handling: - std::pointer_to_unary_function < int , void > h1 (&hangup); - std::pointer_to_unary_function < int , void > h2 (&interrupt); - std::pointer_to_unary_function < int , void > h3 (&catch_signal); - cygwin.set_handler (SIGHUP, &h1); - cygwin.set_handler (SIGINT, &h2); - cygwin.set_handler (SIGUSR1, &h3); + cygwin.set_handler (SIGHUP, hangup); + cygwin.set_handler (SIGINT, interrupt); + cygwin.set_handler (SIGUSR1, catch_signal); =20 // Make sure the signal handler thread has had time to start... Sleep (100); diff --git a/winsup/testsuite/winsup.api/cygload.h b/winsup/testsuite/winsu= p.api/cygload.h index 8007fd59326d..30154048b0a5 100644 --- a/winsup/testsuite/winsup.api/cygload.h +++ b/winsup/testsuite/winsup.api/cygload.h @@ -102,7 +102,7 @@ namespace cygwin public: // The constructor will automatically hook you up for receiving // cygwin signals. Just specify a signal and pass in a signal_handler. - typedef std::pointer_to_unary_function signal_handler; + typedef void signal_handler (int); signal_handler *set_handler (int signal, signal_handler *); =20 private: