Eliminate 'scope of variable can be reduced' cppcheck warnings
authorIvan Maidanski <ivmai@mail.ru>
Sat, 27 Aug 2016 05:48:02 +0000 (08:48 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 27 Aug 2016 05:52:28 +0000 (08:52 +0300)
commit224ecfa5ed62b575376267c4168c3f5e6daf69cf
tree8425dee46ab6285affd2c5ded4d4a11bb138b652
parentfc339c65ad0fffc2e5bc8332bab9c1c70329c04e
Eliminate 'scope of variable can be reduced' cppcheck warnings

* cord/cordbscs.c (CORD_cat_char_star, CORD_from_fn,
CORD_substr_checked, CORD_riter4, CORD_init_min_len): Move local
variable declaration to the inner scope where the variable is used.
* cord/cordxtra.c (CORD_cmp, CORD_ncmp, CORD_from_file_eager): Likewise.
* cord/tests/cordtest.c (test_basics): Likewise.
* cord/tests/de.c (line_pos, replace_line): Likewise.
* dbg_mlc.c (GC_generate_random_heap_address): Likewise.
* mark.c (GC_print_trace_inner): Likewise.
* misc.c (GC_printf): Likewise.
* cord/cordbscs.c (CORD_cat_char_star, CORD_from_fn,
CORD_substr_checked, CORD_riter4, CORD_init_min_len): Remove "register"
keyword for the moved variable.
* cord/cordxtra.c (CORD_cmp, CORD_ncmp, CORD_from_file_eager): Likewise.
* cord/tests/de.c (replace_line): Likewise.
cord/cordbscs.c
cord/cordxtra.c
cord/tests/cordtest.c
cord/tests/de.c
dbg_mlc.c
mark.c
misc.c