libbluray | branch: master | hpi1 <[email protected]> | Wed Sep 26 16:06:19 2012 +0300| [984211fbba3d69e5296c190ef3f97152edbac99c] | committer: hpi1
Avoid shadowing variables. Added warning -Wshadow. > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=984211fbba3d69e5296c190ef3f97152edbac99c --- configure.ac | 2 ++ src/libbluray/bdnav/navigation.c | 6 +++--- src/libbluray/decoders/graphics_controller.c | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 900a0cd..ab82d57 100644 --- a/configure.ac +++ b/configure.ac @@ -199,6 +199,8 @@ check_cc_options -Wundef && \ SET_WARNINGS="$SET_WARNINGS -Wundef" check_cc_options -Wmissing-prototypes && \ SET_WARNINGS="$SET_WARNINGS -Wmissing-prototypes" +check_cc_options -Wshadow && \ + SET_WARNINGS="$SET_WARNINGS -Wshadow" # no implicit function declarations check_cc_options -Werror-implicit-function-declaration && \ diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c index e7a28f1..5bfb239 100644 --- a/src/libbluray/bdnav/navigation.c +++ b/src/libbluray/bdnav/navigation.c @@ -791,13 +791,13 @@ NAV_CLIP* nav_set_angle(NAV_TITLE *title, NAV_CLIP *clip, unsigned angle) title->packets = 0; for (ii = 0; ii < title->pl->list_count; ii++) { MPLS_PI *pi; - NAV_CLIP *clip; + NAV_CLIP *cl; pi = &title->pl->play_item[ii]; - clip = &title->clip_list.clip[ii]; + cl = &title->clip_list.clip[ii]; _fill_clip(title, pi->clip, pi->connection_condition, pi->in_time, pi->out_time, pi->angle_count, - clip, ii, &pos, &time); + cl, ii, &pos, &time); } _extrapolate_title(title); return clip; diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c index 394771a..856abb0 100644 --- a/src/libbluray/decoders/graphics_controller.c +++ b/src/libbluray/decoders/graphics_controller.c @@ -925,9 +925,9 @@ static int _user_input(GRAPHICS_CONTROLLER *gc, uint32_t key, GC_NAV_CMDS *cmds) } if (new_btn_id != cur_btn_id) { - BD_IG_BUTTON *button = _find_button_page(page, new_btn_id, NULL); - if (button) { - cmds->sound_id_ref = button->selected_sound_id_ref; + BD_IG_BUTTON *new_button = _find_button_page(page, new_btn_id, NULL); + if (new_button) { + cmds->sound_id_ref = new_button->selected_sound_id_ref; } } } _______________________________________________ libbluray-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libbluray-devel
