Commit e01fe6d57567804011ed618208d9a6ff42d31cf0

Authored by malc
1 parent 371bc573

Fix warnings introduced in r5948

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5976 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 7 deletions
cpu-all.h
... ... @@ -234,7 +234,7 @@ static inline int lduw_le_p(const void *ptr)
234 234 __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
235 235 return val;
236 236 #else
237   - uint8_t *p = ptr;
  237 + const uint8_t *p = ptr;
238 238 return p[0] | (p[1] << 8);
239 239 #endif
240 240 }
... ... @@ -246,7 +246,7 @@ static inline int ldsw_le_p(const void *ptr)
246 246 __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
247 247 return (int16_t)val;
248 248 #else
249   - uint8_t *p = ptr;
  249 + const uint8_t *p = ptr;
250 250 return (int16_t)(p[0] | (p[1] << 8));
251 251 #endif
252 252 }
... ... @@ -258,14 +258,14 @@ static inline int ldl_le_p(const void *ptr)
258 258 __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (ptr));
259 259 return val;
260 260 #else
261   - uint8_t *p = ptr;
  261 + const uint8_t *p = ptr;
262 262 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
263 263 #endif
264 264 }
265 265  
266 266 static inline uint64_t ldq_le_p(const void *ptr)
267 267 {
268   - uint8_t *p = ptr;
  268 + const uint8_t *p = ptr;
269 269 uint32_t v1, v2;
270 270 v1 = ldl_le_p(p);
271 271 v2 = ldl_le_p(p + 4);
... ... @@ -413,7 +413,7 @@ static inline int lduw_be_p(const void *ptr)
413 413 : "m" (*(uint16_t *)ptr));
414 414 return val;
415 415 #else
416   - uint8_t *b = (uint8_t *) ptr;
  416 + const uint8_t *b = ptr;
417 417 return ((b[0] << 8) | b[1]);
418 418 #endif
419 419 }
... ... @@ -428,7 +428,7 @@ static inline int ldsw_be_p(const void *ptr)
428 428 : "m" (*(uint16_t *)ptr));
429 429 return (int16_t)val;
430 430 #else
431   - uint8_t *b = (uint8_t *) ptr;
  431 + const uint8_t *b = ptr;
432 432 return (int16_t)((b[0] << 8) | b[1]);
433 433 #endif
434 434 }
... ... @@ -443,7 +443,7 @@ static inline int ldl_be_p(const void *ptr)
443 443 : "m" (*(uint32_t *)ptr));
444 444 return val;
445 445 #else
446   - uint8_t *b = (uint8_t *) ptr;
  446 + const uint8_t *b = ptr;
447 447 return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3];
448 448 #endif
449 449 }
... ...