Couple of bugs

Marc Lehmann schmorp at schmorp.de
Wed Feb 25 07:46:36 CET 2009


On Mon, Feb 23, 2009 at 09:22:28AM -0500, Steve Grubb <sgrubb at redhat.com> wrote:
> > C has well-defined behaviour in this case. Please read the section about
> > "warnings" in the manual. In short: we cannot care for each and every
> > weird compiler warning implemented by your compiler - if you enable
> > warnings for your compiler that flag valid code, then you have to deal
> > with it yourself.
> 
> But why have the warning at all when its easy to fix? :)

Because compilers ahve all sorts of warnings. Implementing workarounds
for each and every compiler will greatly reduce maintainability of the
source code. Warnings are also often more or less bogus (for example, the
aliasing warnings in some versions of gcc).

Please read the relevant section about compiler warnings in the docs.

Just FYI: I do not get a warning about that with my compiler (which is gcc-4.3.2).

> In any event, I did some more digging and found another very minor issue. In 
> ev_poll.c at line 96, we have this code:

You probably mean ev_epoll.c?

> nev is not updated between the two. So, the code at line 96 would never 
> execute.

There is lots of code in libev that will never execute under spoecific
circumstances (for example, all asserts).

That's not an issue, as the code will work correctly, the code is simply an
algorithmic hint.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at goof.com
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list