Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning : "MEM_STATS" / "MEMP_STATS" redefined when not using NDEBUG #2211

Closed
maxint-rd opened this issue Jun 9, 2024 · 0 comments · Fixed by #2213
Closed

Warning : "MEM_STATS" / "MEMP_STATS" redefined when not using NDEBUG #2211

maxint-rd opened this issue Jun 9, 2024 · 0 comments · Fixed by #2213

Comments

@maxint-rd
Copy link

First of all a big Thank You for making and maintaining this Arduino core for the RP2040.
It helped me a lot in my projects for the rPi PICO.

With the goal to test debugging of the PICO I just installed the latest core release v3.9.2 in Arduino IDE v2.3.2 on my Windows 11 PC. Upon compiling my test project I saw a few warnings coming by regarding redefinition of MEM_STATS and MEMP_STATS in lwipopts.h:

C:\Users\Myusername\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.9.2/tools/libpico/lwipopts.h:79: warning: "MEMP_STATS" redefined
   79 | #define MEMP_STATS                  1
      | 
C:\Users\Myusername\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.9.2/tools/libpico/lwipopts.h:47: note: this is the location of the previous definition
   47 | #define MEMP_STATS                  0
      | 
C:\Users\Myusername\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.9.2/tools/libpico/lwipopts.h:80: warning: "MEM_STATS" redefined
   80 | #define MEM_STATS                   1
      | 
C:\Users\Myusername\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.9.2/tools/libpico/lwipopts.h:45: note: this is the location of the previous definition
   45 | #define MEM_STATS                   0

Upon closer inspection of this file I noticed that the redefinition is depending on the definition of NDEBUG:

#ifndef NDEBUG
#define LWIP_DEBUG                  1
#define LWIP_STATS                  1
#define LWIP_STATS_DISPLAY          1
#define MEMP_STATS                  1
#define MEM_STATS                   1
#endif

I assume that this is remeniscent of some development session where these defines were set for debugging. I also noticed that in the earlier version I have installed on another PC (release 3,8.1), these values were not redefined.
Of course this isn't a major issue, but you may want to fix this, hence this notification. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant