Skip to content

Commit

Permalink
unittests: fix compiling in release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
goldsimon committed Oct 10, 2023
1 parent 4323e95 commit 9e2fb28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/unit/lwip_unittests.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,15 @@ void lwip_check_ensure_no_alloc(unsigned int skip)
}
for (i = 0, mask = 1; i < MEMP_MAX; i++, mask <<= 1) {
if (!(skip & mask)) {
#if defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY
fail_unless(lwip_stats.memp[i]->used == 0,
"memp pool '%s' still has %d entries allocated",
lwip_stats.memp[i]->name, lwip_stats.memp[i]->used);
#else
fail_unless(lwip_stats.memp[i]->used == 0,
"memp pool %d still has %d entries allocated",
i, lwip_stats.memp[i]->used);
#endif
}
}
}
Expand Down

0 comments on commit 9e2fb28

Please sign in to comment.