diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-09 14:10:17 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-09 14:10:17 +0900 |
| commit | 29556a49a0419ba60721efe2b0fa2c9ecff863f7 (patch) | |
| tree | daabe1e7b612c21421fb1edf56ab95fa0b5cf179 /src/cdump.c | |
| parent | b5aa08fc9ef70774cec391985cdc02f19dfb12e5 (diff) | |
| download | mruby-29556a49a0419ba60721efe2b0fa2c9ecff863f7.tar.gz mruby-29556a49a0419ba60721efe2b0fa2c9ecff863f7.zip | |
cdump.c: avoid uninitialized local variable.
Diffstat (limited to 'src/cdump.c')
| -rw-r--r-- | src/cdump.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cdump.c b/src/cdump.c index 72b4ad0b3..84cc24ae4 100644 --- a/src/cdump.c +++ b/src/cdump.c @@ -274,7 +274,7 @@ cdump_debug(mrb_state *mrb, const char *name, int n, mrb_irep_debug_info *info, const char *filename; mrb_int file_len; int len, i; - const char *line_type; + const char *line_type = "mrb_debug_line_ary"; if (!simple_debug_info(info)) return MRB_DUMP_INVALID_IREP; @@ -290,7 +290,6 @@ cdump_debug(mrb_state *mrb, const char *name, int n, mrb_irep_debug_info *info, switch (info->files[0]->line_type) { case mrb_debug_line_ary: - line_type = "mrb_debug_line_ary"; fprintf(fp, "static uint16_t %s_debug_lines_%d[%d] = {", name, n, len); for (i=0; i<len; i++) { if (i%10 == 0) fputs("\n", fp); |
