diff options
| author | dearblue <[email protected]> | 2019-08-24 11:44:51 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2019-08-24 11:44:51 +0900 |
| commit | c9c27e9d69ddd656343b8a0e876887f511fe6d03 (patch) | |
| tree | 402011481eadc4c02cc003aee3d1eab952dcb07b /src | |
| parent | 71242c0f2e1c07b693baf12ead8384dbfd120cb5 (diff) | |
| download | mruby-c9c27e9d69ddd656343b8a0e876887f511fe6d03.tar.gz mruby-c9c27e9d69ddd656343b8a0e876887f511fe6d03.zip | |
Suppress warning by gcc with `-Wmaybe-uninitialized`
Diffstat (limited to 'src')
| -rw-r--r-- | src/string.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/string.c b/src/string.c index 190e87123..8d1d53521 100644 --- a/src/string.c +++ b/src/string.c @@ -164,6 +164,8 @@ mrb_str_new_capa(mrb_state *mrb, size_t capa) } else if (capa >= MRB_INT_MAX) { mrb_raise(mrb, E_ARGUMENT_ERROR, "string capacity size too big"); + /* not reached */ + s = NULL; } else { s = str_init_normal_capa(mrb, mrb_obj_alloc_string(mrb), NULL, 0, capa); |
