Compiler warning

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiler warning

boisbu
Hi all,

I have this compiler warning using Lwip 1.4.1:
lwip/src/api/tcpip.c:107:9: warning: implicit declaration of function 'ip_input' [-Wimplicit-function-declaration]

It seems this file requires "lwip/ip.h" to remove this warning.

Please help to fix this point,

Thanks,

Pierre-Yves.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiler warning

Peter LM
Hi,

Have you modified your compiler source paths?
If it is just a warning it doesn't matter... The linker will do the job. But if you want to remove it then add right path to your compiler option or just include (#include ProjName/lwIP/include/ipv4/lwIP/ip.h)


If you cannot compile it is probably due to IPv4-IPv6 conflict. And you will be able to solve this issue by removing either IPv4 or IPv6 source file. Or just exclude it if your using an IDE..).

Regards,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Compiler warning

boisbu
Hi Peter

Thanks for your reply.
My project compiles & links correctly. 
I am just wondering how to fix this warning.

The include file list in the makefile is:
...
LWIP_LIB_DIR=ThirdParty/lwip
...

-I $(LWIP_LIB_DIR)/src/include \
-I $(LWIP_LIB_DIR)/src/include/ipv4 \
-I $(LWIP_LIB_DIR)/src/netif \

Could you please highlight me where to add this include path? Is it directly in the lwip/src/api/tcpip.c file?

Regards,
Pierre-Yves

2013/7/11 Peter LM <[hidden email]>
Hi,

Have you modified your compiler source paths?
If it is just a warning it doesn't matter... The linker will do the job. But
if you want to remove it then add right path to your compiler option or just
include (#include ProjName/lwIP/include/ipv4/lwIP/ip.h)


If you cannot compile it is probably due to IPv4-IPv6 conflict. And you will
be able to solve this issue by removing either IPv4 or IPv6 source file. Or
just exclude it if your using an IDE..).

Regards,
Peter



--
View this message in context: http://lwip.100.n7.nabble.com/Compiler-warning-tp21733p21734.html
Sent from the lwip-users mailing list archive at Nabble.com.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiler warning

Peter LM
boisbu wrote
Could you please highlight me where to add this include path? Is it
directly in the lwip/src/api/tcpip.c file?
Please remove your folder "src". The right hierarchy (if I am right) is lwIP/api/tcpip.c . Do you see the difference?

1) Copy your entire "src" folder then copy it next to it (under lwIP folder), finally remove it.

2) Add to your include paths:

-I $(LWIP_LIB_DIR)/include \
-I $(LWIP_LIB_DIR)/include\ipv4 \
-I $(LWIP_LIB_DIR)/netif\include \
-I $(LWIP_LIB_DIR)/lwIP_Apps \       -> this one is optionnal

3) Everything should be ok but if the warning is still there then go at the top of "tcpip.c" and add :
#include "lwip/ip.h"

Regards,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Compiler warning

boisbu
Hi Peter,

I keep the same hierarchy than the zip available here: http://download.savannah.gnu.org/releases/lwip/lwip-1.4.1.zip
+ UPGRADING
+ README
+ FILES
+ COPYING
+ CHANGELOG
+ test/
+ src/
+ doc/

There should not have any difference to move src/ folder on top of LWIP_LIB_DIR path, it's fully equivalent.

The only option that works is point 3).

Do you know if it is planned to be fixed in source code of tcpip.c ?

Regards,
Pierre-Yves.








2013/7/11 Peter LM <[hidden email]>
boisbu wrote
> Could you please highlight me where to add this include path? Is it
> directly in the lwip/src/api/tcpip.c file?

Please remove your folder "src". The right hierarchy (if I am right) is
lwIP/api/tcpip.c . Do you see the difference?

1) Copy your entire "src" folder then copy it next to it (under lwIP
folder), finally remove it.

2) Add to your include paths:

-I $(LWIP_LIB_DIR)/include \
-I $(LWIP_LIB_DIR)/include\ipv4 \
-I $(LWIP_LIB_DIR)/netif\include \
-I $(LWIP_LIB_DIR)/lwIP_Apps \       -> this one is optionnal

3) Everything should be ok but if the warning is still there then go at the
top of "tcpip.c" and add :
#include "lwip/ip.h"

Regards,
Peter



--
View this message in context: http://lwip.100.n7.nabble.com/Compiler-warning-tp21733p21736.html
Sent from the lwip-users mailing list archive at Nabble.com.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiler warning

Peter LM
It's strange because I am using exactly the same release than you with the same paths (and I guess you use GCC as compiler ? ) but I don't get any warning.
The only difference is our hierarchy but It should work since you precised entire dir in paths...
I quickly checked and it is not a referenced bug.
At the second point of this wiki you will find why I suggested you to change hierarchy but I am aware it is not an obligation and won't change anything.
http://lwip.wikia.com/wiki/Using_lwIP_in_a_project

Regards,
Peter