summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Martin <consume.noise@gmail.com>2013-01-09 12:52:15 +0100
committerDaniel Martin <consume.noise@gmail.com>2013-08-15 00:34:21 +0200
commitb9efd2a09a45616f6238e4da49b8f2127b6ec6d9 (patch)
treef045ff20f2397433329a0a4b1ec230350f9b3b6d /src
parent5648ddd2b97068f549268284129a438a6845e14c (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/c_client.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/c_client.py b/src/c_client.py
index c477bab..2aba741 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -1132,11 +1132,11 @@ def _c_serialize(context, self):
_c(' %s *xcb_out = *_buffer;', 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_align_to;')
+ _c(' unsigned int xcb_align_to = 0;')
else:
_c(' char *xcb_out = *_buffer;')
_c(' unsigned int xcb_buffer_len = 0;')
- _c(' unsigned int xcb_align_to;')
+ _c(' unsigned int xcb_align_to = 0;')
prefix = [('_aux', '->', self)]
aux_ptr = 'xcb_out'
@@ -1159,7 +1159,7 @@ def _c_serialize(context, self):
_c(' unsigned int xcb_buffer_len = 0;')
_c(' unsigned int xcb_block_len = 0;')
_c(' unsigned int xcb_pad = 0;')
- _c(' unsigned int xcb_align_to;')
+ _c(' unsigned int xcb_align_to = 0;')
elif 'sizeof' == context:
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_block_len = 0;')
_c(' unsigned int xcb_pad = 0;')
- _c(' unsigned int xcb_align_to;')
+ _c(' unsigned int xcb_align_to = 0;')
_c('')
for t in temp_vars: