1 diff -uNr elfutils-0.94.orig/libdw/dwarf_getloclist.c elfutils-0.94/libdw/dwarf_getloclist.c
2 --- elfutils-0.94.orig/libdw/dwarf_getloclist.c 2004-01-09 09:39:54.000000000 +0100
3 +++ elfutils-0.94/libdw/dwarf_getloclist.c 2004-04-02 14:14:37.667598440 +0200
5 if (unlikely (data >= end_data))
8 - newloc->number = *((int8_t *) data)++;
9 + newloc->number = *(int8_t *)data++;
13 diff -uNr elfutils-0.94.orig/libdw/dwarf_getsrclines.c elfutils-0.94/libdw/dwarf_getsrclines.c
14 --- elfutils-0.94.orig/libdw/dwarf_getsrclines.c 2004-01-12 01:30:17.000000000 +0100
15 +++ elfutils-0.94/libdw/dwarf_getsrclines.c 2004-04-02 14:14:35.850874624 +0200
17 uint_fast8_t default_is_stmt = *linep++;
19 /* Now the line base. */
20 - int_fast8_t line_base = *((int_fast8_t *) linep)++;
21 + int_fast8_t line_base = *(int_fast8_t *)linep++;
23 /* And the line range. */
24 uint_fast8_t line_range = *linep++;
25 diff -uNr elfutils-0.94.orig/libdw/memory-access.h elfutils-0.94/libdw/memory-access.h
26 --- elfutils-0.94.orig/libdw/memory-access.h 2004-01-16 18:43:30.000000000 +0100
27 +++ elfutils-0.94/libdw/memory-access.h 2004-04-02 14:17:02.641559048 +0200
29 /* Number decoding macros. See 7.6 Variable Length Data. */
30 #define get_uleb128(var, addr) \
32 - unsigned char __b = *((const unsigned char *) addr)++; \
33 + unsigned char __b = *(const unsigned char *)addr++; \
37 - __b = *((const unsigned char *) addr)++; \
38 + __b = *(const unsigned char *)addr++; \
39 var |= (__b & 0x7f) << 7; \
42 - __b = *((const unsigned char *) addr)++; \
43 + __b = *(const unsigned char *)addr++; \
44 var |= (__b & 0x7f) << 14; \
47 - __b = *((const unsigned char *) addr)++; \
48 + __b = *(const unsigned char *)addr++; \
49 var |= (__b & 0x7f) << 21; \
51 /* Other implementation set VALUE to UINT_MAX in this \
53 /* The signed case is a big more complicated. */
54 #define get_sleb128(var, addr) \
56 - unsigned char __b = *((const unsigned char *) addr)++; \
57 + unsigned char __b = *(const unsigned char *)addr++; \
58 int32_t __res = __b & 0x7f; \
59 if ((__b & 0x80) == 0) \
65 - __b = *((const unsigned char *) addr)++; \
66 + __b = *(const unsigned char *)addr++; \
67 __res |= (__b & 0x7f) << 7; \
68 if ((__b & 0x80) == 0) \
74 - __b = *((const unsigned char *) addr)++; \
75 + __b = *(const unsigned char *)addr++; \
76 __res |= (__b & 0x7f) << 14; \
77 if ((__b & 0x80) == 0) \
83 - __b = *((const unsigned char *) addr)++; \
84 + __b = *(const unsigned char *)addr++; \
85 __res |= (__b & 0x7f) << 21; \
86 if ((__b & 0x80) == 0) \
90 #define read_2ubyte_unaligned_inc(Dbg, Addr) \
91 ({ uint16_t t_ = read_2ubyte_unaligned (Dbg, Addr); \
92 - ++((const uint16_t *) (Addr)); \
93 + (Addr) += sizeof(uint16_t *); \
95 #define read_2sbyte_unaligned_inc(Dbg, Addr) \
96 ({ int16_t t_ = read_2sbyte_unaligned (Dbg, Addr); \
97 - ++((const int16_t *) (Addr)); \
98 + (Addr) += sizeof(int16_t *); \
101 #define read_4ubyte_unaligned_inc(Dbg, Addr) \
102 ({ uint32_t t_ = read_4ubyte_unaligned (Dbg, Addr); \
103 - ++((const uint32_t *) (Addr)); \
104 + (Addr) += sizeof(uint32_t *); \
106 #define read_4sbyte_unaligned_inc(Dbg, Addr) \
107 ({ int32_t t_ = read_4sbyte_unaligned (Dbg, Addr); \
108 - ++((const int32_t *) (Addr)); \
109 + (Addr) += sizeof(int32_t *); \
112 #define read_8ubyte_unaligned_inc(Dbg, Addr) \
113 ({ uint64_t t_ = read_8ubyte_unaligned (Dbg, Addr); \
114 - ++((const uint64_t *) (Addr)); \
115 + (Addr) += sizeof(uint64_t *); \
117 #define read_8sbyte_unaligned_inc(Dbg, Addr) \
118 ({ int64_t t_ = read_8sbyte_unaligned (Dbg, Addr); \
119 - ++((const int64_t *) (Addr)); \
120 + (Addr) += sizeof(int64_t *); \
123 #endif /* memory-access.h */
124 diff -uNr elfutils-0.94.orig/libelf/dl-hash.h elfutils-0.94/libelf/dl-hash.h
125 --- elfutils-0.94.orig/libelf/dl-hash.h 2003-12-25 19:31:59.000000000 +0100
126 +++ elfutils-0.94/libelf/dl-hash.h 2004-04-02 14:15:11.725420864 +0200
128 __attribute__ ((__pure__))
129 _dl_elf_hash (const char *name)
131 - unsigned int hash = (unsigned int) *((const unsigned char *) name)++;
132 + unsigned int hash = (unsigned int) *(const unsigned char *)name++;
136 - + (unsigned int) *((const unsigned char *) name)++);
137 + + (unsigned int) *(const unsigned char *)name++);
141 - + (unsigned int) *((const unsigned char *) name)++);
142 + + (unsigned int) *(const unsigned char *)name++);
146 - + (unsigned int) *((const unsigned char *) name)++);
147 + + (unsigned int) *(const unsigned char *)name++);
151 - + (unsigned int) *((const unsigned char *) name)++);
152 + + (unsigned int) *(const unsigned char *)name++);
153 while (*name != '\0')
157 - + (unsigned int) *((const unsigned char *) name)++);
158 + + (unsigned int) *(const unsigned char *)name++);
159 hi = hash & 0xf0000000;
161 /* The algorithm specified in the ELF ABI is as
162 diff -uNr elfutils-0.94.orig/libelf/gelf_xlate.c elfutils-0.94/libelf/gelf_xlate.c
163 --- elfutils-0.94.orig/libelf/gelf_xlate.c 2003-12-25 19:42:38.000000000 +0100
164 +++ elfutils-0.94/libelf/gelf_xlate.c 2004-04-02 14:16:48.045777944 +0200
169 - *((word##Bytes##_t *) dest)++ = \
170 + *((word##Bytes##_t *)dest) = \
171 LEN##Bytes##_SWAP ((word##Bytes##_t *) ptr); \
172 - ((word##Bytes##_t *) ptr)++; \
173 + dest += sizeof(word##Bytes##_t *); \
174 + ptr += sizeof(word##Bytes##_t *); \
178 diff -uNr elfutils-0.94.orig/src/ldgeneric.c elfutils-0.94/src/ldgeneric.c
179 --- elfutils-0.94.orig/src/ldgeneric.c 2003-08-18 01:49:51.000000000 +0200
180 +++ elfutils-0.94/src/ldgeneric.c 2004-04-02 14:15:18.573379816 +0200
181 @@ -2449,9 +2449,8 @@
182 ld_state.outfname = "a.out";
184 size_t outfname_len = strlen (ld_state.outfname);
185 - char *tempfname = (char *) ld_state.tempfname
186 - = (char *) obstack_alloc (&ld_state.smem,
187 - outfname_len + sizeof (".XXXXXX"));
188 + char *tempfname = ld_state.tempfname
189 + = obstack_alloc (&ld_state.smem, outfname_len + sizeof (".XXXXXX"));
193 diff -uNr elfutils-0.94.orig/src/ld.h elfutils-0.94/src/ld.h
194 --- elfutils-0.94.orig/src/ld.h 2003-08-12 08:46:39.000000000 +0200
195 +++ elfutils-0.94/src/ld.h 2004-04-02 14:15:18.562381488 +0200
197 /* Name of the output file. */
198 const char *outfname;
199 /* Name of the temporary file we initially create. */
200 - const char *tempfname;
202 /* File descriptor opened for the output file. */
204 /* The ELF descriptor for the output file. */
205 diff -uNr elfutils-0.94.orig/src/readelf.c elfutils-0.94/src/readelf.c
206 --- elfutils-0.94.orig/src/readelf.c 2004-01-16 10:29:37.000000000 +0100
207 +++ elfutils-0.94/src/readelf.c 2004-04-02 14:16:44.674290488 +0200
208 @@ -2974,7 +2974,7 @@
209 Dwarf_Word offset = 0;
212 - size_t op = *((unsigned char *) data)++;
213 + size_t op = *(unsigned char *)data++;
217 @@ -3004,7 +3004,7 @@
219 printf (" %*s [%4" PRIuMAX "] %s %" PRIu8 "\n",
220 (int) (20 + level * 2), "", (uintmax_t) offset,
221 - known[op] ?: "???", *((uint8_t *) data)++);
222 + known[op] ?: "???", *(uint8_t *)data++);
226 @@ -3039,7 +3039,7 @@
228 printf (" %*s [%4" PRIuMAX "] %s %" PRId8 "\n",
229 (int) (20 + level * 2), "", (uintmax_t) offset,
230 - known[op] ?: "???", *((int8_t *) data)++);
231 + known[op] ?: "???", *(int8_t *)data++);
235 @@ -3090,7 +3090,7 @@
239 - get_sleb128 (sleb, ((unsigned char *) data));
240 + get_sleb128 (sleb, (unsigned char *)data);
241 printf (" %*s [%4" PRIuMAX "] %s %d\n",
242 (int) (20 + level * 2), "", (uintmax_t) offset,
243 known[op] ?: "???", sleb);
244 @@ -3100,8 +3100,8 @@
248 - get_uleb128 (uleb, ((unsigned char *) data));
249 - get_sleb128 (sleb, ((unsigned char *) data));
250 + get_uleb128 (uleb, (unsigned char *)data);
251 + get_sleb128 (sleb, (unsigned char *)data);
252 printf (" %*s [%4" PRIuMAX "] %s %u %d\n",
253 (int) (20 + level * 2), "", (uintmax_t) offset,
254 known[op] ?: "???", uleb, sleb);