[Crosstoolchain-logs] [device-tree-compiler] 141/198: Improve portability

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:07:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.

commit 242c2642709436ceb144f9949868ff54050c70a2
Author: Phil Elwell <phil at raspberrypi.org>
Date:   Fri Oct 17 23:22:11 2014 +0100

    Improve portability
    
    1) Remove the double parentheses around two comparisons in checks.c.
       The OSX LLVM-based C compiler warns about them.
    2) Put an explicit "=" in the TN() macro, in accordance with c99.
    
    Signed-off-by: Phil Elwell <phil at raspberrypi.org>
---
 checks.c  | 4 ++--
 fdtdump.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/checks.c b/checks.c
index 47eda65..3bf0fa4 100644
--- a/checks.c
+++ b/checks.c
@@ -624,11 +624,11 @@ static void check_avoid_default_addr_size(struct check *c, struct node *dt,
 	if (!reg && !ranges)
 		return;
 
-	if ((node->parent->addr_cells == -1))
+	if (node->parent->addr_cells == -1)
 		FAIL(c, "Relying on default #address-cells value for %s",
 		     node->fullpath);
 
-	if ((node->parent->size_cells == -1))
+	if (node->parent->size_cells == -1)
 		FAIL(c, "Relying on default #size-cells value for %s",
 		     node->fullpath);
 }
diff --git a/fdtdump.c b/fdtdump.c
index a29aa5e..95a6a20 100644
--- a/fdtdump.c
+++ b/fdtdump.c
@@ -22,7 +22,7 @@
 static const char *tagname(uint32_t tag)
 {
 	static const char * const names[] = {
-#define TN(t) [t] #t
+#define TN(t) [t] = #t
 		TN(FDT_BEGIN_NODE),
 		TN(FDT_END_NODE),
 		TN(FDT_PROP),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list