aboutsummaryrefslogtreecommitdiff
path: root/winsup/testsuite
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2024-01-19 15:11:32 +0100
committerCorinna Vinschen <corinna@vinschen.de>2024-01-19 15:11:32 +0100
commit3f2d03a78014a7351ccce1732d9d9a3a45637584 (patch)
treee7329cd473a8a9ecb9c3ccc85e00932e6339715a /winsup/testsuite
parent47f079b98e46792c776dbea230d92a6dfc1d428f (diff)
downloadnewlib-3f2d03a78014a7351ccce1732d9d9a3a45637584.zip
newlib-3f2d03a78014a7351ccce1732d9d9a3a45637584.tar.gz
newlib-3f2d03a78014a7351ccce1732d9d9a3a45637584.tar.bz2
Cygwin: remove warnings from testsuite build
- drop unused variable - remove deprectated usage of std::pointer_to_unary_function. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/testsuite')
-rw-r--r--winsup/testsuite/cygrun.c1
-rw-r--r--winsup/testsuite/winsup.api/cygload.cc9
-rw-r--r--winsup/testsuite/winsup.api/cygload.h2
3 files changed, 4 insertions, 8 deletions
diff --git a/winsup/testsuite/cygrun.c b/winsup/testsuite/cygrun.c
index 4502013..50c5187 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 = 1;
- char *p;
DWORD timeout = 60 * 1000;
if (argc < 2)
diff --git a/winsup/testsuite/winsup.api/cygload.cc b/winsup/testsuite/winsup.api/cygload.cc
index f5ca8db..afd3ee9 100644
--- a/winsup/testsuite/winsup.api/cygload.cc
+++ b/winsup/testsuite/winsup.api/cygload.cc
@@ -597,12 +597,9 @@ main (int argc, char *argv[])
}
// 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);
// 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/winsup.api/cygload.h
index 8007fd5..3015404 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<int,void> signal_handler;
+ typedef void signal_handler (int);
signal_handler *set_handler (int signal, signal_handler *);
private: