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

Martin Sustrik sustrik at fastmq.com
Tue Apr 28 11:05:57 CEST 2009


> I'm using gcc 4.3.2 and am running into some warnings, which are treated
> as errors in the zeromq build.
> The warnings are:
>   error: suggest explicit braces to avoid ambiguous "else"
> The spots I saw these come up in are:
>   poll_thread.cpp:156
>   epoll_thread.cpp:159
>   select_thread.cpp:197
> Rather than bother adding the missing brackets, I removed -Werror from
> the makefiles.
> 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).

Thanks for letting us know of the problem. It'll be fixed shortly.

As for -Werror, I wouldn't switch it off by default. The point is that 
0MQ is an enterprise level application, meaning that any failure has 
potentially grave financial consequences. That being the case, you want 
to get all the diagnostics on potential problems as soon as possible, so 
that they can be fixed immediately, long before code gets into production.


More information about the zeromq-dev mailing list