Re: New unused variables warning in nx_start()

2020-05-07 Thread Nathan Hartman
The PR is #996. https://github.com/apache/incubator-nuttx/pull/996 Cheers, Nathan

Re: New unused variables warning in nx_start()

2020-05-07 Thread Nathan Hartman
I have some new insights about what happened here. The compiler warnings in nx_start.c that were the reason I started this thread: init/nx_start.c: In function 'nx_start': init/nx_start.c:552:14: warning: unused variable 'heap_size' [-Wunused-variable] size_t heap_size; ^

Re: New unused variables warning in nx_start()

2020-05-07 Thread Nathan Hartman
On Thu, May 7, 2020 at 1:30 PM Gregory Nutt wrote: > > On 5/7/2020 11:29 AM, Nathan Hartman wrote: > > On Thu, May 7, 2020 at 12:49 PM Gregory Nutt wrote: > >> No.. this code was broken with with commit > >> eca70597858bc619d3114901d16e4a30f1ebffbe . There is no point trying to > >> make sense o

Re: New unused variables warning in nx_start()

2020-05-07 Thread Gregory Nutt
On 5/7/2020 11:29 AM, Nathan Hartman wrote: On Thu, May 7, 2020 at 12:49 PM Gregory Nutt wrote: No.. this code was broken with with commit eca70597858bc619d3114901d16e4a30f1ebffbe . There is no point trying to make sense out of this. It is just broken and needs to be fixed. (snip) So there

Re: New unused variables warning in nx_start()

2020-05-07 Thread Nathan Hartman
On Thu, May 7, 2020 at 12:49 PM Gregory Nutt wrote: > No.. this code was broken with with commit > eca70597858bc619d3114901d16e4a30f1ebffbe . There is no point trying to > make sense out of this. It is just broken and needs to be fixed. (snip) > So there is not a lot of sense in us discussing

Re: New unused variables warning in nx_start()

2020-05-07 Thread Gregory Nutt
When doing a FLAT build, do we ever build nx_start.c twice, once with __KERNEL__ and once without? (In my configuration, it is built only once.) No Regarding the code: /* Initialize the memory manager */ { FAR void *heap_start; size_t heap_size; #ifdef MM_KERNEL_USRHE

Re: New unused variables warning in nx_start()

2020-05-07 Thread Nathan Hartman
On Thu, May 7, 2020 at 12:21 PM Gregory Nutt wrote: > In the build, we build both user space code and internal OS code. > __KERNEL__, if defined means that we are currently building the internal > OS code. That allows the same files to be build differently depending > on if it is inside our outsi

Re: New unused variables warning in nx_start()

2020-05-07 Thread Gregory Nutt
But I don't understand this logic: When does !defined(CONFIG_BUILD_KERNEL) && defined(__KERNEL__) happen? In the build, we build both user space code and internal OS code.  __KERNEL__, if defined means that we are currently building the internal OS code.  That allows the same files to be build

Re: New unused variables warning in nx_start()

2020-05-07 Thread Nathan Hartman
ent: Thursday, May 7, 2020 1:18 PM > To: dev@nuttx.apache.org > Subject: Re: New unused variables warning in nx_start() > > Removing this [1] ifdefs introduced the warning in a flat build. > > 1. > https://github.com/apache/incubator-nuttx/commi

RE: New unused variables warning in nx_start()

2020-05-06 Thread Xiang Xiao
nused variables warning in nx_start() Removing this [1] ifdefs introduced the warning in a flat build. 1. https://github.com/apache/incubator-nuttx/commit/eca70597858bc619d3114901d16e4a30f1ebffbe#diff-e36621b38d26a5eeb9f0c9c779931e7bL548 On Wed, May 6, 2020 at 7:11 PM Nathan Hartman wrote: > >

Re: New unused variables warning in nx_start()

2020-05-06 Thread Abdelatif Guettouche
Removing this [1] ifdefs introduced the warning in a flat build. 1. https://github.com/apache/incubator-nuttx/commit/eca70597858bc619d3114901d16e4a30f1ebffbe#diff-e36621b38d26a5eeb9f0c9c779931e7bL548 On Wed, May 6, 2020 at 7:11 PM Nathan Hartman wrote: > > On Wed, May 6, 2020 at 12:25 PM Xiang

Re: New unused variables warning in nx_start()

2020-05-06 Thread Nathan Hartman
On Wed, May 6, 2020 at 12:25 PM Xiang Xiao wrote: > Should you at least use one method to give OS the basic heap? Can you boot > nuttx into nsh with the current configuration? I don't know yet, because I cannot load and run it right now. I have a feeling that something has changed in the implem

RE: New unused variables warning in nx_start()

2020-05-06 Thread Xiang Xiao
Should you at least use one method to give OS the basic heap? Can you boot nuttx into nsh with the current configuration? -Original Message- From: Nathan Hartman Sent: Wednesday, May 6, 2020 11:18 PM To: dev@nuttx.apache.org Subject: New unused variables warning in nx_start() In functi