summaryrefslogtreecommitdiff
path: root/py/repl.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-05-11 13:48:47 +1000
committerDamien George <damien.p.george@gmail.com>2018-05-11 13:48:47 +1000
commit6046e68fe19ca3e88e6e55438be9b2dee98723af (patch)
tree7b6485a8196b527014de4e8f395be8f69337efd7 /py/repl.c
parent095d3970173f3d4ad6c43bd0c363b727d3a67241 (diff)
py/repl: Initialise q_last variable to prevent compiler warnings.
Some older compilers cannot deduce that q_last is always written to before being read.
Diffstat (limited to 'py/repl.c')
-rw-r--r--py/repl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/repl.c b/py/repl.c
index a5a3ee007..5dce8bbb7 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -175,7 +175,7 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print
// look for matches
const char *match_str = NULL;
size_t match_len = 0;
- qstr q_first = 0, q_last;
+ qstr q_first = 0, q_last = 0;
for (qstr q = MP_QSTR_ + 1; q < nqstr; ++q) {
size_t d_len;
const char *d_str = (const char*)qstr_data(q, &d_len);