All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] tools: fix env_flags build
@ 2016-02-14 19:13 Lubomir Rintel
  2016-02-15 22:35 ` [U-Boot] [U-Boot,v2] " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Lubomir Rintel @ 2016-02-14 19:13 UTC (permalink / raw)
  To: u-boot

  $ 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@v3.sk>
---
Changes since v1:
  - Moved from tools/env/env_flags.c to common/env_flags.c
    as per suggestion from Tom Rini

 common/env_flags.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/env_flags.c b/common/env_flags.c
index 735bba5..921d377 100644
--- a/common/env_flags.c
+++ b/common/env_flags.c
@@ -15,6 +15,7 @@
 #include <env_attr.h>
 #include <env_flags.h>
 #define getenv fw_getenv
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 #else
 #include <common.h>
 #include <environment.h>
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [U-Boot,v2] tools: fix env_flags build
  2016-02-14 19:13 [U-Boot] [PATCH v2] tools: fix env_flags build Lubomir Rintel
@ 2016-02-15 22:35 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2016-02-15 22:35 UTC (permalink / raw)
  To: u-boot

On Sun, Feb 14, 2016 at 08:13:24PM +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@v3.sk>

Applied to u-boot/master, 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/20160215/806e74cf/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-15 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-14 19:13 [U-Boot] [PATCH v2] tools: fix env_flags build Lubomir Rintel
2016-02-15 22:35 ` [U-Boot] [U-Boot,v2] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.