From 19ddfb317fc57239cc4f7144683c060bdb8317e7 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 24 May 2020 15:13:05 +0200 Subject: [Ada] Fix warnings in C runtime files on Windows gcc/ada/ * adaint.h (__gnat_expect_portable_execvp): Fix prototype. (__gnat_expect_poll): Likewise. * expect.c [_WIN32]: Include adaint.h file. (__gnat_waitpid): Remove useless variable. (__gnat_expect_portable_execvp): Add ATTRIBUTE_UNUSED on parameter. * raise-gcc.c [SEH] (__gnat_personality_v0): Add ATTRIBUTE_UNUSED. * socket.c [_WIN32] (__gnat_getservbyport): Add ATTRIBUTE_UNUSED on a couple of parameters. (__gnat_gethostbyname): Likewise. (__gnat_gethostbyaddr): Likewise. (__gnat_getservbyname): Likewise. (__gnat_last_socket_in_set): Use variables local to loops. (__gnat_socket_ioctl): Cast 3rd parameter to proper type if _WIN32. (__gnat_inet_pton): Cast 2nd parameter to proper type if _WIN32. * sysdep.c (__gnat_localtime_tzoff): Remove superfluous test. * terminals.c [_WIN32]: Include io.h file. (is_gui_app): Remove useless variables and fix unsigned comparison. (nt_spawnve): Add ATTRIBUTE_UNUSED on first parameter. Initialize a local variable and remove others that are useless. Add missing cast (__gnat_setup_child_communication): Remove useless variable and call Use proper formatting string in call to sprintf. (__gnat_setup_parent_communication): Cast to proper type. (find_child_console): Fix prototype and remove useless variable. (find_process_handle): Likewise. (_gnat_interrupt_process): Move to after __gnat_interrupt_pid. (__gnat_reset_tty): Add ATTRIBUTE_UNUSED on parameter, remove return (__gnat_setup_winsize): Add ATTRIBUTE_UNUSED on all parameters. --- gcc/ada/raise-gcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/raise-gcc.c') diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c index 559a42f..1446bfa 100644 --- a/gcc/ada/raise-gcc.c +++ b/gcc/ada/raise-gcc.c @@ -1611,7 +1611,7 @@ __gnat_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame, /* Define __gnat_personality_v0 for convenience */ -PERSONALITY_STORAGE _Unwind_Reason_Code +PERSONALITY_STORAGE ATTRIBUTE_UNUSED _Unwind_Reason_Code __gnat_personality_v0 (version_arg_t version_arg, phases_arg_t phases_arg, _Unwind_Exception_Class uw_exception_class, -- cgit v1.1