diff mbox

[U-Boot] utx8245: fix build breakage due to assert()

Message ID 1315663665-24926-1-git-send-email-wd@denx.de
State Accepted
Commit ea95cb73310c075e4f2e05e2ffb4443cac1825cd
Headers show

Commit Message

Wolfgang Denk Sept. 10, 2011, 2:07 p.m. UTC
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>
---
 common/dlmalloc.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

Comments

Wolfgang Denk Sept. 10, 2011, 8:42 p.m. UTC | #1
Dear Wolfgang Denk,

In message <1315663665-24926-1-git-send-email-wd@denx.de> you wrote:
> 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>
> ---
>  common/dlmalloc.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index f2080c6..c645d73 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1647,9 +1647,7 @@  static void do_check_chunk(mchunkptr p)
 static void do_check_chunk(p) mchunkptr p;
 #endif
 {
-#if 0	/* causes warnings because assert() is off */
   INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
-#endif	/* 0 */
 
   /* No checkable chunk is mmapped */
   assert(!chunk_is_mmapped(p));
@@ -1671,9 +1669,7 @@  static void do_check_free_chunk(p) mchunkptr p;
 #endif
 {
   INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
-#if 0	/* causes warnings because assert() is off */
   mchunkptr next = chunk_at_offset(p, sz);
-#endif	/* 0 */
 
   do_check_chunk(p);
 
@@ -1737,10 +1733,8 @@  static void do_check_malloced_chunk(mchunkptr p, INTERNAL_SIZE_T s)
 static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s;
 #endif
 {
-#if 0	/* causes warnings because assert() is off */
   INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
   long room = sz - s;
-#endif	/* 0 */
 
   do_check_inuse_chunk(p);