summaryrefslogtreecommitdiffstats
path: root/src/unaligned.h
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2008-02-29 10:17:16 +0000
committerRoland McGrath <[email protected]>2008-02-29 10:17:16 +0000
commit47c5c35de6bc548dff7577e3dae38d183b719232 (patch)
tree394cb1742a0980c11e34cecd046ec955f462057a /src/unaligned.h
parent834de6f38901b6add14b6f5f7dda8550638d98ec (diff)
src/
2008-02-29 Roland McGrath <[email protected]> * readelf.c (print_attributes): Add a cast. * elflint.c (check_attributes): Likewise. * unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition. (add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.
Diffstat (limited to 'src/unaligned.h')
-rw-r--r--src/unaligned.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unaligned.h b/src/unaligned.h
index bf1e5299..ad7c55a5 100644
--- a/src/unaligned.h
+++ b/src/unaligned.h
@@ -1,5 +1,5 @@
/* Unaligned memory access functionality.
- Copyright (C) 2000, 2001, 2002, 2003 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2008 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <[email protected]>, 2001.
@@ -89,19 +89,19 @@ union u_8ubyte_unaligned
#else
# define add_2ubyte_unaligned(ptr, value) \
do { \
- union u_2ubyte_unaligned *_ptr = (ptr); \
+ union u_2ubyte_unaligned *_ptr = (void *) (ptr); \
uint16_t _val = bswap_16 (_ptr->u) + (value); \
_ptr->u = bswap_16 (_val); \
} while (0)
# define add_4ubyte_unaligned(ptr, value) \
do { \
- union u_4ubyte_unaligned *_ptr = (ptr); \
+ union u_4ubyte_unaligned *_ptr = (void *) (ptr); \
uint32_t _val = bswap_32 (_ptr->u) + (value); \
_ptr->u = bswap_32 (_val); \
} while (0)
# define add_8ubyte_unaligned(ptr, value) \
do { \
- union u_8ubyte_unaligned *_ptr = (ptr); \
+ union u_8ubyte_unaligned *_ptr = (void *) (ptr); \
uint64_t _val = bswap_64 (_ptr->u) + (value); \
_ptr->u = bswap_64 (_val); \
} while (0)