lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Converting to git


From: Wojciech A. Koszek
Subject: Re: [lwip-devel] Converting to git
Date: Mon, 25 Jul 2011 19:47:35 +0100
User-agent: Opera Mail/11.50 (Linux)

Dnia 25-07-2011 o 12:10:13 Simon Goldschmidt <address@hidden> napisał(a):

"Wojciech A. Koszek" <address@hidden> wrote:
>> ./../src/core/pbuf.c
>> cc1: warnings being treated as errors
>> ../../../../src/core/pbuf.c:115:1: error: no previous prototype for
>> ‘pbuf_free_ooseq’
>> make[1]: *** [pbuf.o] Błąd 1
>> make[1]: Opuszczenie katalogu
>> `/home/wkoszek/r/sw/kos/net/lwip/ports/unix/proj/unixsim'
>> make: *** [all] Błąd 2
int
main()
{

        p();
}

void
p(void)
{

}
address@hidden:~/p/warn/1$ gcc main.c -o main
main.c:11:1: warning: conflicting types for ‘p’
main.c:7:2: note: previous implicit declaration of ‘p’ was here

Your 2nd example is something different and obviously a bug (using a function before it has been declared).

However, in pbuf.c, pbuf_free_ooseq() is implemented at line 115 (where it warns!) and used in line 143. This is a different kind of warning, which I haven't seen yet. The only purpose that I can see for this warning is to prevent unused global functions (so making it static would be the fix)?

That was my first guess. But GCC complained about it, since in src/core/timers.c
has this:

432 #if PBUF_POOL_FREE_OOSEQ
433       PBUF_CHECK_FREE_OOSEQ();
434 #endif /* PBUF_POOL_FREE_OOSEQ */

This calls pbuf_free_ooseq(). If you get rid of this from this file (somehow),
we'll be able to make pbuf_free_ooseq() static or remove it at all.

This is the only place that calls PBUF_CHECK_FREE_OOSEQ.

--
Wojciech A. Koszek
address@hidden
http://FreeBSD.czest.pl/~wkoszek/



reply via email to

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