Commit ea95cb73310c075e4f2e05e2ffb4443cac1825cd

Authored by Wolfgang Denk
1 parent aaf6935b22

utx8245: fix build breakage due to assert()

Commit 21726a7 "Add assert() for debug assertions" broke building the
utx8245 board:

dlmalloc.c: In function 'do_check_chunk':
dlmalloc.c:1660: error: 'sz' undeclared (first use in this function)
dlmalloc.c:1660: error: (Each undeclared identifier is reported only once
dlmalloc.c:1660: error: for each function it appears in.)
dlmalloc.c: In function 'do_check_free_chunk':
dlmalloc.c:1689: error: 'next' undeclared (first use in this function)
dlmalloc.c: In function 'do_check_malloced_chunk':
dlmalloc.c:1748: error: 'sz' undeclared (first use in this function)
dlmalloc.c:1750: error: 'room' undeclared (first use in this function)

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>

Showing 1 changed file with 0 additions and 6 deletions Side-by-side Diff

... ... @@ -1647,9 +1647,7 @@
1647 1647 static void do_check_chunk(p) mchunkptr p;
1648 1648 #endif
1649 1649 {
1650   -#if 0 /* causes warnings because assert() is off */
1651 1650 INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
1652   -#endif /* 0 */
1653 1651  
1654 1652 /* No checkable chunk is mmapped */
1655 1653 assert(!chunk_is_mmapped(p));
1656 1654  
... ... @@ -1671,9 +1669,7 @@
1671 1669 #endif
1672 1670 {
1673 1671 INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
1674   -#if 0 /* causes warnings because assert() is off */
1675 1672 mchunkptr next = chunk_at_offset(p, sz);
1676   -#endif /* 0 */
1677 1673  
1678 1674 do_check_chunk(p);
1679 1675  
1680 1676  
... ... @@ -1737,10 +1733,8 @@
1737 1733 static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s;
1738 1734 #endif
1739 1735 {
1740   -#if 0 /* causes warnings because assert() is off */
1741 1736 INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
1742 1737 long room = sz - s;
1743   -#endif /* 0 */
1744 1738  
1745 1739 do_check_inuse_chunk(p);
1746 1740