mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
glz-encoder-dict: Remove a warning compiling with CentOS 7
CentOS 7 compiler generate this warning:
glz-encoder-dict.c: In function 'glz_dictionary_pre_encode':
glz-encoder-dict.c:516:30: error: 'prev_seg_id' may be used uninitialized in this function [-Werror=maybe-uninitialized]
dict->window.segs[prev_seg_id].next = seg_id;
^
glz-encoder-dict.c:492:22: note: 'prev_seg_id' was declared here
uint32_t seg_id, prev_seg_id;
^
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
65eca77c81
commit
c778c7ce93
@ -489,7 +489,8 @@ static WindowImage *glz_dictionary_window_add_image(SharedDictionary *dict, LzIm
|
||||
{
|
||||
unsigned int num_lines = num_first_lines;
|
||||
unsigned int row;
|
||||
uint32_t seg_id, prev_seg_id;
|
||||
uint32_t seg_id;
|
||||
uint32_t prev_seg_id = 0;
|
||||
uint8_t* lines = first_lines;
|
||||
// alloc image info,update used head tail, if used_head null - update head
|
||||
WindowImage *image = __glz_dictionary_window_alloc_image(dict);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user