[Spice-devel] [spice-server PATCH v2 05/10] glz: WindowImageSegment lines lines_end as void*
Victor Toso
victortoso at redhat.com
Fri Aug 14 09:24:26 PDT 2015
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);
^~~~~~~~~~~~~~~~~~~~~~~~~
---
server/glz_encoder_dictionary_protected.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
--
2.4.3
More information about the Spice-devel
mailing list