Patches to fix compiler warnings on IA64
Thorsten Kukuk
kukuk@suse.de
Thu Jul 8 20:55:00 GMT 2004
Hi,
there are two patches from Andreas Schwab, which fixes some compiler
warnings if you build glibc on IA64. Seems he never send it to the
list, so I'm doing it now. Both are attached.
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE Linux AG Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
-------------- next part --------------
2004-04-16 Andreas Schwab <schwab@suse.de>
* sysdeps/ia64/bits/atomic.h: Cast first argument of
__sync_bool_compare_and_swap_si correct to void*.
--- sysdeps/ia64/bits/atomic.h 01 Jul 2003 15:10:11 +0200 1.8
+++ sysdeps/ia64/bits/atomic.h 16 Apr 2004 14:54:05 +0200
@@ -52,11 +52,11 @@ typedef uintmax_t uatomic_max_t;
(abort (), 0)
#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
- (!__sync_bool_compare_and_swap_si ((int *) (mem), (int) (long) (oldval), \
+ (!__sync_bool_compare_and_swap_si ((void *) (mem), (int) (long) (oldval), \
(int) (long) (newval)))
#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
- (!__sync_bool_compare_and_swap_di ((long *) (mem), (long) (oldval), \
+ (!__sync_bool_compare_and_swap_di ((void *) (mem), (long) (oldval), \
(long) (newval)))
#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
@@ -66,11 +66,11 @@ typedef uintmax_t uatomic_max_t;
(abort (), (__typeof (*mem)) 0)
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap_si ((int *) (mem), (int) (long) (oldval), \
+ __sync_val_compare_and_swap_si ((void *) (mem), (int) (long) (oldval), \
(int) (long) (newval))
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap_di ((long *) (mem), (long) (oldval), \
+ __sync_val_compare_and_swap_di ((void *) (mem), (long) (oldval), \
(long) (newval))
/* Atomically store newval and return the old value. */
@@ -84,9 +84,9 @@ typedef uintmax_t uatomic_max_t;
#define atomic_exchange_and_add(mem, value) \
({ __typeof (*mem) __result; \
if (sizeof (*mem) == 4) \
- __result = __sync_fetch_and_add_si ((int *) (mem), (int) (value)); \
+ __result = __sync_fetch_and_add_si ((void *) (mem), (int) (value)); \
else if (sizeof (*mem) == 8) \
- __result = __sync_fetch_and_add_di ((long *) (mem), (long) (value)); \
+ __result = __sync_fetch_and_add_di ((void *) (mem), (long) (value)); \
else \
abort (); \
__result; })
-------------- next part --------------
2004-04-16 Andreas Schwab <schwab@suse.de>
* sysdeps/ia64/tls.h: Cast dl_sysinfo to void*.
--- linuxthreads/sysdeps/ia64/tls.h 08 Mar 2004 00:59:55 +0100 1.8
+++ linuxthreads/sysdeps/ia64/tls.h 16 Apr 2004 12:00:07 +0200
@@ -83,7 +83,7 @@ typedef struct
#if defined NEED_DL_SYSINFO
# define INIT_SYSINFO \
- (((tcbhead_t *)__thread_self)->private = GLRO(dl_sysinfo))
+ (((tcbhead_t *) __thread_self)->private = (void *) GLRO(dl_sysinfo))
#else
# define INIT_SYSINFO 0
#endif
More information about the Libc-alpha
mailing list