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>
This commit is contained in:
Corinna Vinschen 2024-01-19 15:11:32 +01:00
parent 47f079b98e
commit 3f2d03a780
3 changed files with 4 additions and 8 deletions

View File

@ -22,7 +22,6 @@ main (int argc, char **argv)
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
DWORD res; DWORD res;
DWORD ec = 1; DWORD ec = 1;
char *p;
DWORD timeout = 60 * 1000; DWORD timeout = 60 * 1000;
if (argc < 2) if (argc < 2)

View File

@ -597,12 +597,9 @@ main (int argc, char *argv[])
} }
// And signal handling: // And signal handling:
std::pointer_to_unary_function < int , void > h1 (&hangup); cygwin.set_handler (SIGHUP, hangup);
std::pointer_to_unary_function < int , void > h2 (&interrupt); cygwin.set_handler (SIGINT, interrupt);
std::pointer_to_unary_function < int , void > h3 (&catch_signal); cygwin.set_handler (SIGUSR1, catch_signal);
cygwin.set_handler (SIGHUP, &h1);
cygwin.set_handler (SIGINT, &h2);
cygwin.set_handler (SIGUSR1, &h3);
// Make sure the signal handler thread has had time to start... // Make sure the signal handler thread has had time to start...
Sleep (100); Sleep (100);

View File

@ -102,7 +102,7 @@ namespace cygwin
public: public:
// The constructor will automatically hook you up for receiving // The constructor will automatically hook you up for receiving
// cygwin signals. Just specify a signal and pass in a signal_handler. // 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 *); signal_handler *set_handler (int signal, signal_handler *);
private: private: