mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-31 23:11:09 +00:00
Fix wanings in clock_gettime
This commit is contained in:
parent
9694fc4479
commit
7edb22eff5
@ -1,5 +1,10 @@
|
|||||||
2011-11-12 Ulrich Drepper <drepper@gmail.com>
|
2011-11-12 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/clock_gettime.c (clock_gettime): No need to assign
|
||||||
|
result of SYSDEP_GETTIME_CPU to retval.
|
||||||
|
* sysdeps/unix/sysv/linux/clock_gettime.c (SYSDEP_GETTIME_CPU): Add
|
||||||
|
parameter list to macro. Remove trailing semicolon. Adjust users.
|
||||||
|
|
||||||
* resolv/getaddrinfo_a.c (getaddrinfo_a): Avoid warning about unused
|
* resolv/getaddrinfo_a.c (getaddrinfo_a): Avoid warning about unused
|
||||||
variable.
|
variable.
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef SYSDEP_GETTIME_CPU
|
#ifdef SYSDEP_GETTIME_CPU
|
||||||
retval = SYSDEP_GETTIME_CPU (clock_id, tp);
|
SYSDEP_GETTIME_CPU (clock_id, tp);
|
||||||
#endif
|
#endif
|
||||||
#if HP_TIMING_AVAIL
|
#if HP_TIMING_AVAIL
|
||||||
if ((clock_id & ((1 << CLOCK_IDFIELD_SIZE) - 1))
|
if ((clock_id & ((1 << CLOCK_IDFIELD_SIZE) - 1))
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
|
|
||||||
/* This means the REALTIME and MONOTONIC clock are definitely
|
/* This means the REALTIME and MONOTONIC clock are definitely
|
||||||
supported in the kernel. */
|
supported in the kernel. */
|
||||||
# define SYSDEP_GETTIME \
|
# define SYSDEP_GETTIME \
|
||||||
SYSDEP_GETTIME_CPUTIME \
|
SYSDEP_GETTIME_CPUTIME; \
|
||||||
case CLOCK_REALTIME: \
|
case CLOCK_REALTIME: \
|
||||||
case CLOCK_MONOTONIC: \
|
case CLOCK_MONOTONIC: \
|
||||||
retval = SYSCALL_GETTIME (clock_id, tp); \
|
retval = SYSCALL_GETTIME (clock_id, tp); \
|
||||||
@ -82,8 +82,8 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
|
|||||||
|
|
||||||
/* The REALTIME and MONOTONIC clock might be available. Try the
|
/* The REALTIME and MONOTONIC clock might be available. Try the
|
||||||
syscall first. */
|
syscall first. */
|
||||||
# define SYSDEP_GETTIME \
|
# define SYSDEP_GETTIME \
|
||||||
SYSDEP_GETTIME_CPUTIME \
|
SYSDEP_GETTIME_CPUTIME; \
|
||||||
case CLOCK_REALTIME: \
|
case CLOCK_REALTIME: \
|
||||||
case CLOCK_MONOTONIC: \
|
case CLOCK_MONOTONIC: \
|
||||||
case CLOCK_MONOTONIC_RAW: \
|
case CLOCK_MONOTONIC_RAW: \
|
||||||
@ -100,7 +100,7 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
|
|||||||
__set_errno (retval); \
|
__set_errno (retval); \
|
||||||
retval = -1; \
|
retval = -1; \
|
||||||
} \
|
} \
|
||||||
break;
|
break
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __NR_clock_gettime
|
#ifdef __NR_clock_gettime
|
||||||
@ -164,7 +164,7 @@ maybe_syscall_gettime_cpu (clockid_t clock_id, struct timespec *tp)
|
|||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
# define SYSDEP_GETTIME_CPU \
|
# define SYSDEP_GETTIME_CPU(clock_id, tp) \
|
||||||
retval = maybe_syscall_gettime_cpu (clock_id, tp); \
|
retval = maybe_syscall_gettime_cpu (clock_id, tp); \
|
||||||
if (retval == 0) \
|
if (retval == 0) \
|
||||||
break; \
|
break; \
|
||||||
@ -199,7 +199,7 @@ maybe_syscall_gettime_cputime (clockid_t clock_id, struct timespec *tp)
|
|||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
retval = hp_timing_gettime (clock_id, tp); \
|
retval = hp_timing_gettime (clock_id, tp); \
|
||||||
break;
|
break
|
||||||
# if !HP_TIMING_AVAIL
|
# if !HP_TIMING_AVAIL
|
||||||
# define hp_timing_gettime(clock_id, tp) (__set_errno (EINVAL), -1)
|
# define hp_timing_gettime(clock_id, tp) (__set_errno (EINVAL), -1)
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
Reference in New Issue
Block a user