Commit 6d889343 authored by Florian Fainelli's avatar Florian Fainelli Committed by David Gibson
Browse files

dtc: avoid shadowing dirname()



dirname() is declared as a function, and later on try_open() another
variable dirname is used, which shadows the dirname() function
declaration and will produce the following warnings/errors with
-Wshadow turned on:

srcpos.c: In function 'try_open':
srcpos.c:71:35: error: declaration of 'dirname' shadows a global
declaration [-Werror=shadow]
srcpos.c:37:14: error: shadowed declaration is here [-Werror=shadow]
srcpos.c: In function 'srcfile_add_search_path':
srcpos.c:183:42: error: declaration of 'dirname' shadows a global
declaration [-Werror=shadow]
srcpos.c:37:14: error: shadowed declaration is here [-Werror=shadow]
cc1: all warnings being treated as errors

Fix this by renaming the function dirname() to get_dirname().

Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
parent fa3f3f0e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment