Re: Latest libev gcc warning

2012-05-04 Thread Marc Lehmann
On Wed, May 02, 2012 at 10:35:45PM +0400, Konstantin Osipov wrote: > We get a new gcc warning with the latest libev: Please read the manual first, especially the part about warnings. > Please consider the below patch as a fix: There is nothing to fix in libev, this is a gcc bug #45977. --

Latest libev gcc warning

2012-05-04 Thread Konstantin Osipov
Hello, We get a new gcc warning with the latest libev: libev/ev.c:1264:25: warning: ‘ev_rt_now’ initialized and declared ‘extern’ [enabled by default] We don't use EV_API_STATIC, so EV_API_DECL is defined to 'extern'. Please consider the below patch as a fix: diff --git a/third_party/libev/ev

Re: C++ API

2012-05-04 Thread fatmck
于 2012年05月03日 21:27, Marc Lehmann 写道: On Thu, May 03, 2012 at 08:45:30AM +0800, 马承珂 wrote: Did you use the "-Wall" option? I just write a very easy sample code to test this on Ubuntu12.04 with g++4.6.3. You said you get it with -O2, and I disagreed, which apparently turned out to be true. -Wa

Re: Re: Re: C++ API

2012-05-04 Thread Marc Lehmann
On Thu, May 03, 2012 at 08:45:30AM +0800, 马承珂 wrote: > Did you use the "-Wall" option? I just write a very easy sample code to test > this on Ubuntu12.04 with g++4.6.3. You said you get it with -O2, and I disagreed, which apparently turned out to be true. -Wall != -O2. -- The c

Re:Re: Re: C++ API

2012-05-04 Thread 马承珂
Did you use the "-Wall" option? I just write a very easy sample code to test this on Ubuntu12.04 with g++4.6.3. ev_o2.cpp: #include "ev.h" ev_io myev; void on_read(struct ev_loop *loop, ev_io *watcher, int events) { } int main() { ev_io_init(&myev, on_read, 0, EV_READ); return 0; } then u

Latest libev gcc warning

2012-05-04 Thread Konstantin Osipov
Hello, We get a new gcc warning with the latest libev: libev/ev.c:1264:25: warning: ‘ev_rt_now’ initialized and declared ‘extern’ [enabled by default] We don't use EV_API_STATIC, so EV_API_DECL is defined to 'extern'. Please consider the below patch as a fix: diff --git a/third_party/libev/ev