Couple of bugs

Steve Grubb sgrubb at redhat.com
Mon Feb 23 15:22:28 CET 2009


On Sunday 22 February 2009 09:44:47 pm Marc Lehmann wrote:
> > It would seem that line 123 of ev.h should be changed to:
>
> 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? :)

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:

      /* if ENOENT then the fd went away, so try to do the right thing */
      if (!nev)
        goto dec_egen;

At line 76, we have:

  if (!nev)
    return;

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

Thanks,
-Steve



More information about the libev mailing list