aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sysdep.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-05-24 15:13:05 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-08 10:55:55 -0400
commit19ddfb317fc57239cc4f7144683c060bdb8317e7 (patch)
tree3ee7d0ab5d2b0af4c7996ead0c6fb9be185b1df2 /gcc/ada/sysdep.c
parent9e8102b350742f09e8c122f3d3ee3f9f2ce4abd4 (diff)
downloadgcc-19ddfb317fc57239cc4f7144683c060bdb8317e7.zip
gcc-19ddfb317fc57239cc4f7144683c060bdb8317e7.tar.gz
gcc-19ddfb317fc57239cc4f7144683c060bdb8317e7.tar.bz2
[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.
Diffstat (limited to 'gcc/ada/sysdep.c')
-rw-r--r--gcc/ada/sysdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c
index 3f96c5f..51ffbd5 100644
--- a/gcc/ada/sysdep.c
+++ b/gcc/ada/sysdep.c
@@ -703,7 +703,7 @@ __gnat_localtime_tzoff (const time_t *timer, const int *is_historic, long *off)
to get timezone settings that depend on the year. We cannot use them as
we still support Windows XP and Windows 2003. */
- status = (tzi_status >= 0 && tzi_status <= 2)
+ status = tzi_status <= 2
&& FileTimeToSystemTime (&utc_time.ft_time, &utc_sys_time)
&& SystemTimeToTzSpecificLocalTime (&tzi, &utc_sys_time, &local_sys_time)
&& SystemTimeToFileTime (&local_sys_time, &local_time.ft_time);