lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwIP compiling warning message.


From: David Empson
Subject: Re: [lwip-users] lwIP compiling warning message.
Date: Wed, 17 Feb 2010 10:36:12 +1300

"Bill Yang" <address@hidden> wrote:
I am compiling a demo project which is FreeRTOS + lwIP (webserver demo) + Keil(RVMDK) + Luminary6965.
I got a compiling warning message below.

..\Common\ethernet\lwip-1.3.0\contrib\port\FreeRTOS\LM3S\arch/sys_arch.h(62): warning: #1295-D:
Deprecated declaration sys_set_default_state - give arg types

I wonder if any one have the ideal how to correct.

That particular file is not part of LWIP - it is supplied by whoever ported LWIP to your particular hardware, compiler and operating system. I can't see a function of that name mentioned in core LWIP or the reference ports, so it is very specific to your port, and the only people here who might be able to help directly are those who are using the same platform as you.

I don't have the source code, so I can only speculate, but educated guesswork suggests that the compiler is complaining about a function prototype which has not provided a list of arguments. That was the old-style form of function declaration prior to the introduction of ANSI C, so you could declare the return type of a function. With an ANSI C compiler, the function prototype must also specify the list of argument types. If the function has no arguments, the prototype must specify an argument list of (void).

C++ chose to use an empty argument list as meaning "function has no arguments", so a possible explanation is that someone who usually programs in C++ added a prototype in sys_arch.h for a function with no arguments, and forgot that C requires the argument list to be (void).

To find out what should go in the argument list, have a look at the implementation of the function, probably in sys_arch.c, and copy its declaration line into sys_arch.h, replacing the faulty prototype.

You should report this to the supplier of your LWIP port, as it is a bug in their header file.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]