mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00: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;
|
||||
|
||||
#if defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY
|
||||
#if MEMP_STATS
|
||||
static const char * memp_names[] = {
|
||||
#define LWIP_MEMPOOL(name,num,size,desc) desc,
|
||||
#include "lwip/priv/memp_std.h"
|
||||
};
|
||||
#endif /* MEMP_STATS */
|
||||
#endif /* LWIP_DEBUG || LWIP_STATS_DISPLAY */
|
||||
|
||||
void
|
||||
stats_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user