lupyuen commented on PR #15444: URL: https://github.com/apache/nuttx/pull/15444#issuecomment-2586229642
Erm @yf13 could you try `static char NAME[]` instead of `static char *NAME`? It makes a difference... ```c static char test_static[] = "Testing Static Var"; //// TODO: Added this static const char test_static_const[] = "Testing Static Cnost Var"; //// TODO: Added this static char *NAME = "NuttX"; Address of test_static=0xc0100200 test_static_const=Testing Static Cnost Var Address of test_static_const=0xc0001f10 Hello, World of NuttX!! ``` The reason why I chose `static char []` is because uname uses that: https://github.com/apache/nuttx/blob/a2d4d74af75ffab527ac2422798c3368101da5f3/libs/libc/misc/lib_utsname.c#L53-L60 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
