mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
stats: Add proper #if guard to prevent unused-variable warning for memp_names
The usages of memp_names are under either LWIP_DEBUG in stats_init, or under LWIP_STATS_DISPLAY in stats_display_memp. Fix below build warning: lwip/src/core/stats.c:53:21: error: 'memp_names' defined but not used [-Werror=unused-variable] static const char * memp_names[] = { ^ cc1: all warnings being treated as errors Reported-by: David Fernandez Fixes: 2f2a75a6d9fd ("stats: Move memp_names table out of stats_init/stats_display_memp functions") Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
1de8d432d4
commit
f411a34af5
@ -49,12 +49,14 @@
|
|||||||
|
|
||||||
struct stats_ lwip_stats;
|
struct stats_ lwip_stats;
|
||||||
|
|
||||||
|
#if defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY
|
||||||
#if MEMP_STATS
|
#if MEMP_STATS
|
||||||
static const char * memp_names[] = {
|
static const char * memp_names[] = {
|
||||||
#define LWIP_MEMPOOL(name,num,size,desc) desc,
|
#define LWIP_MEMPOOL(name,num,size,desc) desc,
|
||||||
#include "lwip/priv/memp_std.h"
|
#include "lwip/priv/memp_std.h"
|
||||||
};
|
};
|
||||||
#endif /* MEMP_STATS */
|
#endif /* MEMP_STATS */
|
||||||
|
#endif /* LWIP_DEBUG || LWIP_STATS_DISPLAY */
|
||||||
|
|
||||||
void
|
void
|
||||||
stats_init(void)
|
stats_init(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user