[U-Boot] [PATCH] tools: fix env_flags build

Tom Rini trini at konsulko.com
Sun Feb 14 19:54:03 CET 2016


On Sun, Feb 14, 2016 at 09:32:26AM +0100, Lubomir Rintel wrote:

>   $ make tools-all
>   ...
>   In file included from tools/env/env_flags.c:1:0:
>   tools/env/../../common/env_flags.c: In function
>     ‘env_flags_parse_varaccess_from_binflags’:
>     tools/env/../../common/env_flags.c:156:18: warning: implicit declaration
>     of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration]
>       for (i = 0; i < ARRAY_SIZE(env_flags_varaccess_mask); i++)
>                       ^
> Seems like the other utilities just add a copy of ARRAY_SIZE since
> there's nowhere to include it from (tools/imagetool.h,
> tools/mxsimage.h). Let's do the same here.
> 
> Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
> ---
>  tools/env/env_flags.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/env/env_flags.c b/tools/env/env_flags.c
> index b261cb8..63a4a5b 100644
> --- a/tools/env/env_flags.c
> +++ b/tools/env/env_flags.c
> @@ -1 +1,2 @@
> +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
>  #include "../../common/env_flags.c"

I'd like to see this in common/env_flags.c inside of the block of
USE_HOSTCC changes we have there, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160214/7a49b73f/attachment.sig>


More information about the U-Boot mailing list