Commit 8bdc2159db1dc9eec69652a74fb503c0a1953bc2
1 parent
416b5d36
Don't cast lvalues, fixes compiler warning.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2256 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
2 deletions
hw/tcx.c
... | ... | @@ -88,10 +88,11 @@ static void tcx_draw_line32(TCXState *s1, uint8_t *d, |
88 | 88 | { |
89 | 89 | int x; |
90 | 90 | uint8_t val; |
91 | + uint32_t *p = (uint32_t *)d; | |
91 | 92 | |
92 | 93 | for(x = 0; x < width; x++) { |
93 | 94 | val = *s++; |
94 | - *((uint32_t *)d)++ = s1->palette[val]; | |
95 | + *p++ = s1->palette[val]; | |
95 | 96 | } |
96 | 97 | } |
97 | 98 | |
... | ... | @@ -100,10 +101,11 @@ static void tcx_draw_line16(TCXState *s1, uint8_t *d, |
100 | 101 | { |
101 | 102 | int x; |
102 | 103 | uint8_t val; |
104 | + uint16_t *p = (uint16_t *)d; | |
103 | 105 | |
104 | 106 | for(x = 0; x < width; x++) { |
105 | 107 | val = *s++; |
106 | - *((uint16_t *)d)++ = s1->palette[val]; | |
108 | + *p++ = s1->palette[val]; | |
107 | 109 | } |
108 | 110 | } |
109 | 111 | ... | ... |