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@raspberrypi.org>main
parent
6a76a9d30c
commit
242c264270
4
checks.c
4
checks.c
|
@ -624,11 +624,11 @@ static void check_avoid_default_addr_size(struct check *c, struct node *dt,
|
||||||
if (!reg && !ranges)
|
if (!reg && !ranges)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((node->parent->addr_cells == -1))
|
if (node->parent->addr_cells == -1)
|
||||||
FAIL(c, "Relying on default #address-cells value for %s",
|
FAIL(c, "Relying on default #address-cells value for %s",
|
||||||
node->fullpath);
|
node->fullpath);
|
||||||
|
|
||||||
if ((node->parent->size_cells == -1))
|
if (node->parent->size_cells == -1)
|
||||||
FAIL(c, "Relying on default #size-cells value for %s",
|
FAIL(c, "Relying on default #size-cells value for %s",
|
||||||
node->fullpath);
|
node->fullpath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
static const char *tagname(uint32_t tag)
|
static const char *tagname(uint32_t tag)
|
||||||
{
|
{
|
||||||
static const char * const names[] = {
|
static const char * const names[] = {
|
||||||
#define TN(t) [t] #t
|
#define TN(t) [t] = #t
|
||||||
TN(FDT_BEGIN_NODE),
|
TN(FDT_BEGIN_NODE),
|
||||||
TN(FDT_END_NODE),
|
TN(FDT_END_NODE),
|
||||||
TN(FDT_PROP),
|
TN(FDT_PROP),
|
||||||
|
|
Loading…
Reference in New Issue