[Spice-devel,spice-common] lz_compress_tmpl: silence incompatible pointer assignment warning

Submitted by Alon Levy on Aug. 29, 2012, 1:44 p.m.

Details

Message ID 1346247875-360-1-git-send-email-alevy@redhat.com
State Accepted
Commit 149bb89adb0d7676c41085b3e41f07113e05c880
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy Aug. 29, 2012, 1:44 p.m.
cur_seg->lines is always uint8_t*, PIXEL may be that or uint16_t* or uint32_t*.
---
 common/lz_compress_tmpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/common/lz_compress_tmpl.c b/common/lz_compress_tmpl.c
index 7e2ce42..2b66833 100644
--- a/common/lz_compress_tmpl.c
+++ b/common/lz_compress_tmpl.c
@@ -483,7 +483,7 @@  static void FNAME(compress)(Encoder *encoder)
 
     // fetch the first image segment that is not too small
     while (cur_seg && ((((PIXEL *)cur_seg->lines_end) - ((PIXEL *)cur_seg->lines)) < 4)) {
-        ip_start = cur_seg->lines;
+        ip_start = (PIXEL *)cur_seg->lines;
         // coping the segment
         if (cur_seg->lines != cur_seg->lines_end) {
             ip = (PIXEL *)cur_seg->lines;