mirror of https://github.com/MidnightCommander/mc
Ticket #3539: fix reported -Wshadow warning with gcc 4.6.x
src/filemanager/dir.c: In function 'dir_list_grow': src/filemanager/dir.c:263:14: warning: declaration of 'clear' shadows a global declaration [-Wshadow] src/viewer/datasource.c: In function 'mcview_load_command_output': src/viewer/datasource.c:398:16: warning: declaration of 'pipe' shadows a global declaration [-Wshadow] (This not occur with gcc 4.7 or higher). Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
3e622b822e
commit
b457921fda
|
@ -260,7 +260,7 @@ gboolean
|
|||
dir_list_grow (dir_list * list, int delta)
|
||||
{
|
||||
int size;
|
||||
gboolean clear = FALSE;
|
||||
gboolean clear_flag = FALSE;
|
||||
|
||||
if (list == NULL)
|
||||
return FALSE;
|
||||
|
@ -272,7 +272,7 @@ dir_list_grow (dir_list * list, int delta)
|
|||
if (size <= 0)
|
||||
{
|
||||
size = DIR_LIST_MIN_SIZE;
|
||||
clear = TRUE;
|
||||
clear_flag = TRUE;
|
||||
}
|
||||
|
||||
if (size != list->size)
|
||||
|
@ -287,7 +287,7 @@ dir_list_grow (dir_list * list, int delta)
|
|||
list->size = size;
|
||||
}
|
||||
|
||||
list->len = clear ? 0 : min (list->len, size);
|
||||
list->len = clear_flag ? 0 : min (list->len, size);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -395,13 +395,13 @@ mcview_set_datasource_file (WView * view, int fd, const struct stat *st)
|
|||
gboolean
|
||||
mcview_load_command_output (WView * view, const char *command)
|
||||
{
|
||||
mc_pipe_t *pipe;
|
||||
mc_pipe_t *p;
|
||||
GError *error = NULL;
|
||||
|
||||
mcview_close_datasource (view);
|
||||
|
||||
pipe = mc_popen (command, &error);
|
||||
if (pipe == NULL)
|
||||
p = mc_popen (command, &error);
|
||||
if (p == NULL)
|
||||
{
|
||||
mcview_display (view);
|
||||
mcview_show_error (view, error->message);
|
||||
|
@ -410,7 +410,7 @@ mcview_load_command_output (WView * view, const char *command)
|
|||
}
|
||||
|
||||
/* Check if filter produced any output */
|
||||
mcview_set_datasource_stdio_pipe (view, pipe);
|
||||
mcview_set_datasource_stdio_pipe (view, p);
|
||||
if (!mcview_get_byte (view, 0, NULL))
|
||||
{
|
||||
mcview_close_datasource (view);
|
||||
|
|
Loading…
Reference in New Issue