From 053765414c9d3345a628ff11145639506ae90288 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 20 May 2014 16:34:05 +0300 Subject: [PATCH] modstruct: struct_calcsize: Fix case of uninitialized var. --- py/modstruct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/modstruct.c b/py/modstruct.c index 95a282e2ec..19cf9cfd6c 100644 --- a/py/modstruct.c +++ b/py/modstruct.c @@ -85,7 +85,7 @@ STATIC mp_obj_t struct_calcsize(mp_obj_t fmt_in) { char fmt_type = get_fmt_type(&fmt); machine_uint_t size; for (size = 0; *fmt; fmt++) { - uint align; + uint align = 1; machine_uint_t cnt = 1; if (unichar_isdigit(*fmt)) { cnt = get_fmt_num(&fmt);