[Spice-commits] server/glz_encoder_dictionary_protected.h

Frediano Ziglio fziglio at kemper.freedesktop.org
Thu Aug 20 03:19:29 PDT 2015


 server/glz_encoder_dictionary_protected.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2413484305fde600e9b4496a88beac365a7a16ff
Author: Victor Toso <victortoso at redhat.com>
Date:   Fri Aug 14 18:24:26 2015 +0200

    glz: WindowImageSegment lines lines_end as void*
    
    Instead of using uint8_t* which can cause several warnings on casting as
    the example below:
    
    ./glz_encode_tmpl.c:321:29: error: cast from 'uint8_t *'
    (aka 'unsigned char *') to 'rgb16_pixel_t *' (aka 'unsigned short *')
    increases required alignment from 1 to 2 [-Werror,-Wcast-align]
     ref_limit = (PIXEL *)(seg->lines_end);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~

diff --git a/server/glz_encoder_dictionary_protected.h b/server/glz_encoder_dictionary_protected.h
index ee1f8d8..098684f 100644
--- a/server/glz_encoder_dictionary_protected.h
+++ b/server/glz_encoder_dictionary_protected.h
@@ -61,8 +61,8 @@ struct WindowImage {
    An encoded match can refer to only one segment.*/
 struct WindowImageSegment {
     WindowImage     *image;
-    uint8_t         *lines;
-    uint8_t         *lines_end;
+    void            *lines;
+    void            *lines_end;
     uint32_t pixels_num;            // Number of pixels in the segment
     uint64_t pixels_so_far;         // Total no. pixels passed through the window till this segment.
                                     // NOTE - never use size delta independently. It should


More information about the Spice-commits mailing list