[zeromq-dev] Fwd: Warnings as errors and gcc 4.3

Steven McCoy steven.mccoy at miru.hk
Tue Apr 28 06:14:07 CEST 2009


2009/4/28 Garrett Smith <g at rrett.us.com>:
> I suppose running with -Werror is fine, but it does introduce these
> types of problems. It might be something you let users opt in for --
> e.g. contributors might be required to run with that switch (easily
> added in ./configure).

The code in question is pretty bad coding style though, it's not Python,

poll_thread.cpp
        if (pollset [i].revents & POLLIN)
            if (engine)
                engine->in_event ();
            else
                if (!poller_->process_commands ())
                    return true;

epoll_thread.cpp
        if (ev_buf [i].events & EPOLLIN)
            if (pe->engine)
                pe->engine->in_event ();
            else
                if (!poller_->process_commands ())
                    return true;

select_thread.cpp
        if (FD_ISSET (fds [i].fd, &readfds))
            if (fds [i].engine)
                fds [i].engine->in_event ();
            else
                if (!poller_->process_commands ())
                    return true;

-- 
Steve-o
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brackets.patch
Type: text/x-diff
Size: 2921 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090428/a9d5c06a/attachment.patch>


More information about the zeromq-dev mailing list