From: Lubomir Rintel <lkundrak@v3.sk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] tools: fix env_flags build
Date: Sun, 14 Feb 2016 20:13:24 +0100 [thread overview]
Message-ID: <1455477204-17984-1-git-send-email-lkundrak@v3.sk> (raw)
$ 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
next reply other threads:[~2016-02-14 19:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-14 19:13 Lubomir Rintel [this message]
2016-02-15 22:35 ` [U-Boot] [U-Boot,v2] tools: fix env_flags build Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455477204-17984-1-git-send-email-lkundrak@v3.sk \
--to=lkundrak@v3.sk \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.