c_client.py: Always initialize xcb_align_to
to get rid of: warning: 'xcb_align_to' may be used uninitialized in this function Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Peter Harris <pharris@opentext.com>
This commit is contained in:
parent
5648ddd2b9
commit
b9efd2a09a
|
@ -1132,11 +1132,11 @@ def _c_serialize(context, self):
|
||||||
_c(' %s *xcb_out = *_buffer;', self.c_type)
|
_c(' %s *xcb_out = *_buffer;', self.c_type)
|
||||||
_c(' unsigned int xcb_out_pad = -sizeof(%s) & 3;', self.c_type)
|
_c(' unsigned int xcb_out_pad = -sizeof(%s) & 3;', self.c_type)
|
||||||
_c(' unsigned int xcb_buffer_len = sizeof(%s) + xcb_out_pad;', self.c_type)
|
_c(' unsigned int xcb_buffer_len = sizeof(%s) + xcb_out_pad;', self.c_type)
|
||||||
_c(' unsigned int xcb_align_to;')
|
_c(' unsigned int xcb_align_to = 0;')
|
||||||
else:
|
else:
|
||||||
_c(' char *xcb_out = *_buffer;')
|
_c(' char *xcb_out = *_buffer;')
|
||||||
_c(' unsigned int xcb_buffer_len = 0;')
|
_c(' unsigned int xcb_buffer_len = 0;')
|
||||||
_c(' unsigned int xcb_align_to;')
|
_c(' unsigned int xcb_align_to = 0;')
|
||||||
prefix = [('_aux', '->', self)]
|
prefix = [('_aux', '->', self)]
|
||||||
aux_ptr = 'xcb_out'
|
aux_ptr = 'xcb_out'
|
||||||
|
|
||||||
|
@ -1159,7 +1159,7 @@ def _c_serialize(context, self):
|
||||||
_c(' unsigned int xcb_buffer_len = 0;')
|
_c(' unsigned int xcb_buffer_len = 0;')
|
||||||
_c(' unsigned int xcb_block_len = 0;')
|
_c(' unsigned int xcb_block_len = 0;')
|
||||||
_c(' unsigned int xcb_pad = 0;')
|
_c(' unsigned int xcb_pad = 0;')
|
||||||
_c(' unsigned int xcb_align_to;')
|
_c(' unsigned int xcb_align_to = 0;')
|
||||||
|
|
||||||
elif 'sizeof' == context:
|
elif 'sizeof' == context:
|
||||||
param_names = [p[2] for p in params]
|
param_names = [p[2] for p in params]
|
||||||
|
@ -1204,7 +1204,7 @@ def _c_serialize(context, self):
|
||||||
_c(' unsigned int xcb_buffer_len = 0;')
|
_c(' unsigned int xcb_buffer_len = 0;')
|
||||||
_c(' unsigned int xcb_block_len = 0;')
|
_c(' unsigned int xcb_block_len = 0;')
|
||||||
_c(' unsigned int xcb_pad = 0;')
|
_c(' unsigned int xcb_pad = 0;')
|
||||||
_c(' unsigned int xcb_align_to;')
|
_c(' unsigned int xcb_align_to = 0;')
|
||||||
|
|
||||||
_c('')
|
_c('')
|
||||||
for t in temp_vars:
|
for t in temp_vars:
|
||||||
|
|
Loading…
Reference in New Issue