From patchwork Sun Feb 14 19:13:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 582527 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id C5ACF140773 for ; Mon, 15 Feb 2016 06:13:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 497CEA7528; Sun, 14 Feb 2016 20:13:41 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bRs53Sd952vJ; Sun, 14 Feb 2016 20:13:40 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9677EA74C3; Sun, 14 Feb 2016 20:13:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E186EA74C3 for ; Sun, 14 Feb 2016 20:13:37 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xJgB8tZXotza for ; Sun, 14 Feb 2016 20:13:37 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from shell.v3.sk (shell.v3.sk [92.60.52.57]) by theia.denx.de (Postfix) with ESMTPS id AE0B34BB1A for ; Sun, 14 Feb 2016 20:13:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 1B8D141C26; Sun, 14 Feb 2016 20:13:33 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id prOffYFCAAhj; Sun, 14 Feb 2016 20:13:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 5939875E53; Sun, 14 Feb 2016 20:13:29 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id D0lpdelatCqm; Sun, 14 Feb 2016 20:13:28 +0100 (CET) Received: from belphegor.lan (ip-89-176-114-212.net.upcbroadband.cz [89.176.114.212]) by zimbra.v3.sk (Postfix) with ESMTPSA id 48DC241C26; Sun, 14 Feb 2016 20:13:28 +0100 (CET) From: Lubomir Rintel To: Tom Rini Date: Sun, 14 Feb 2016 20:13:24 +0100 Message-Id: <1455477204-17984-1-git-send-email-lkundrak@v3.sk> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 Cc: u-boot@lists.denx.de, Lubomir Rintel Subject: [U-Boot] [PATCH v2] tools: fix env_flags build X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "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 --- 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 #include #define getenv fw_getenv +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #else #include #include