You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Nathan Hartman <ha...@gmail.com> on 2020/01/02 17:00:03 UTC
[PATCH] Fix build warning: Implicit declaration nxsem_post()
Recently this warning started showing up in builds:
icmp/icmp_netpoll.c: In function 'icmp_poll_eventhandler':
icmp/icmp_netpoll.c:129:11: warning: implicit declaration of function
'nxsem_post'; did you mean 'sem_post'?
[-Wimplicit-function-declaration]
nxsem_post(info->fds->sem);
^~~~~~~~~~
sem_post
Caused by removal of include of nuttx/kmalloc.h, which includes
nuttx/userspace.h, which includes pthread.h, which includes sched.h,
which includes semaphore.h.
In other words, icmp/icmp_netpoll.c should include semaphore.h directly.
Patch attached.
Thanks,
Nathan
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Jan 2, 2020 at 1:59 PM Gregory Nutt <sp...@gmail.com> wrote:
> Still don't see it
>
> On 1/2/2020 11:19 AM, Nathan Hartman wrote:
> > On Thu, Jan 2, 2020 at 12:05 PM Gregory Nutt <sp...@gmail.com>
> wrote:
> >>> Recently this warning started showing up in builds:
> > ...
> >>> Patch attached.
> >> I don't see anything attached.
> > It would help if I attached the file. :-)
> >
> > Retrying...
Uh oh, maybe it's being blocked because of the .patch extension.
It might be necessary send patches with a .txt extension.
I'm away from my computer right now but I'll resend the patches soon.
Nathan
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Xiang Xiao <xi...@gmail.com>.
All issues already provide the fix:
https://github.com/apache/incubator-nuttx-apps/pull/3
https://github.com/apache/incubator-nuttx/pull/23
Sorry, Kconfig system is too flexible to cover all combinations.
The automation build check is very impotant to ensure the change can
pass all possible configuration.
Once Haitao finish nxstyle work, he will setup the auto build.
Thanks
Xiang
On Fri, Jan 3, 2020 at 8:10 AM Nathan Hartman <ha...@gmail.com> wrote:
>
> On Thu, Jan 2, 2020 at 3:48 PM Gregory Nutt <sp...@gmail.com> wrote:
> > > Please tell me if two patches appear now...
> >
> > yes, I got them an incorporated them.
> >
> > We need to fix that. Most users will be submitting changes with the
> > .patch suffix.
>
> Deja vu? I thought we had this discussion and asked infra to make the
> necessary changes. Did the changes un-make themselves somehow?
>
> Nathan
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Jan 2, 2020 at 3:48 PM Gregory Nutt <sp...@gmail.com> wrote:
> > Please tell me if two patches appear now...
>
> yes, I got them an incorporated them.
>
> We need to fix that. Most users will be submitting changes with the
> .patch suffix.
Deja vu? I thought we had this discussion and asked infra to make the
necessary changes. Did the changes un-make themselves somehow?
Nathan
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Gregory Nutt <sp...@gmail.com>.
> Please tell me if two patches appear now...
yes, I got them an incorporated them.
We need to fix that. Most users will be submitting changes with the
.patch suffix.
Greg
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Jan 2, 2020 at 1:59 PM Gregory Nutt <sp...@gmail.com> wrote:
>
> Still don't see it
>
> On 1/2/2020 11:19 AM, Nathan Hartman wrote:
> > On Thu, Jan 2, 2020 at 12:05 PM Gregory Nutt <sp...@gmail.com> wrote:
> >>> Recently this warning started showing up in builds:
> > ...
> >>> Patch attached.
> >> I don't see anything attached.
> > It would help if I attached the file. :-)
> >
> > Retrying...
Please tell me if two patches appear now...
Thanks,
Nathan
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Gregory Nutt <sp...@gmail.com>.
Still don't see it
On 1/2/2020 11:19 AM, Nathan Hartman wrote:
> On Thu, Jan 2, 2020 at 12:05 PM Gregory Nutt <sp...@gmail.com> wrote:
>>> Recently this warning started showing up in builds:
> ...
>>> Patch attached.
>> I don't see anything attached.
> It would help if I attached the file. :-)
>
> Retrying...
>
> Nathan
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Jan 2, 2020 at 12:05 PM Gregory Nutt <sp...@gmail.com> wrote:
> > Recently this warning started showing up in builds:
...
> > Patch attached.
>
> I don't see anything attached.
It would help if I attached the file. :-)
Retrying...
Nathan
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Gregory Nutt <sp...@gmail.com>.
> Recently this warning started showing up in builds:
>
> icmp/icmp_netpoll.c: In function 'icmp_poll_eventhandler':
> icmp/icmp_netpoll.c:129:11: warning: implicit declaration of function
> 'nxsem_post'; did you mean 'sem_post'?
> [-Wimplicit-function-declaration]
> nxsem_post(info->fds->sem);
> ^~~~~~~~~~
> sem_post
>
> Caused by removal of include of nuttx/kmalloc.h, which includes
> nuttx/userspace.h, which includes pthread.h, which includes sched.h,
> which includes semaphore.h.
>
> In other words, icmp/icmp_netpoll.c should include semaphore.h directly.
nxsem_post() is declared in nuttx/sempahore.h, not in semaphore. So I
don't see how this could solve the problem.
> Patch attached.
I don't see anything attached.
Greg
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Jan 2, 2020 at 12:21 PM Nathan Hartman <ha...@gmail.com> wrote:
>
> On Thu, Jan 2, 2020 at 12:08 PM Gregory Nutt <sp...@gmail.com> wrote:
> > I am doing a build test now. Yes, I am seeing this new warning too (A
> > LOT). But I am also seeing 'ret may be used uninitialized in this
> > function" in the return value of icmp_pollsetup() in the same file,
> > icmp/icmp_netpoll.c
>
> Interestingly I am not seeing this warning (with my build
> configuration, maybe I need to look into that), but I see it in the
> code. 'ret' needs to be initialized to OK because it doesn't get any
> other value unless an error occurs.
>
> I'll send a patch momentarily...
Here's that patch...
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Jan 2, 2020 at 12:08 PM Gregory Nutt <sp...@gmail.com> wrote:
> I am doing a build test now. Yes, I am seeing this new warning too (A
> LOT). But I am also seeing 'ret may be used uninitialized in this
> function" in the return value of icmp_pollsetup() in the same file,
> icmp/icmp_netpoll.c
Interestingly I am not seeing this warning (with my build
configuration, maybe I need to look into that), but I see it in the
code. 'ret' needs to be initialized to OK because it doesn't get any
other value unless an error occurs.
I'll send a patch momentarily...
Nathan
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Gregory Nutt <sp...@gmail.com>.
> Recently this warning started showing up in builds:
>
> icmp/icmp_netpoll.c: In function 'icmp_poll_eventhandler':
> icmp/icmp_netpoll.c:129:11: warning: implicit declaration of function
> 'nxsem_post'; did you mean 'sem_post'?
> [-Wimplicit-function-declaration]
> nxsem_post(info->fds->sem);
> ^~~~~~~~~~
> sem_post
>
I am doing a build test now. Yes, I am seeing this new warning too (A
LOT). But I am also seeing 'ret may be used uninitialized in this
function" in the return value of icmp_pollsetup() in the same file,
icmp/icmp_netpoll.c
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Gregory Nutt <sp...@gmail.com>.
Xiao Xiang,
These are all errors created by your recent changes to nxsem_ code and
also the the .updated target in the apps/ build system.
You should provide the fixes.
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Gregory Nutt <sp...@gmail.com>.
On 1/2/2020 11:24 AM, Gregory Nutt wrote:
>
>> Same problem in dirvers/modem/altair/altmdm_sys.c -- but worse. More
>> undedefined nxsem_* functions and the build with that driver also
>> fails with "undefined reference to nxsem_timedwait_uninterruptible'
>>
>> LOTs of code breakage with the last PRs! We need a proper workflow
>> to prevent this from happening!
>
> The failing configuration is spresense:lte
Here is yet another build failure:
Configuration: lpc4088-devkit:nsh
Error: *** No rule to make taget '.updated.'
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Gregory Nutt <sp...@gmail.com>.
> Same problem in dirvers/modem/altair/altmdm_sys.c -- but worse. More
> undedefined nxsem_* functions and the build with that driver also
> fails with "undefined reference to nxsem_timedwait_uninterruptible'
>
> LOTs of code breakage with the last PRs! We need a proper workflow to
> prevent this from happening!
The failing configuration is spresense:lte
Re: [PATCH] Fix build warning: Implicit declaration nxsem_post()
Posted by Gregory Nutt <sp...@gmail.com>.
> Recently this warning started showing up in builds:
>
> icmp/icmp_netpoll.c: In function 'icmp_poll_eventhandler':
> icmp/icmp_netpoll.c:129:11: warning: implicit declaration of function
> 'nxsem_post'; did you mean 'sem_post'?
> [-Wimplicit-function-declaration]
> nxsem_post(info->fds->sem);
> ^~~~~~~~~~
> sem_post
>
Same problem in dirvers/modem/altair/altmdm_sys.c -- but worse. More
undedefined nxsem_* functions and the build with that driver also fails
with "undefined reference to nxsem_timedwait_uninterruptible'
LOTs of code breakage with the last PRs! We need a proper workflow to
prevent this from happening!