[zeromq-dev] Compilation fails when NDEBUG is enabled.

Arthur O'Dwyer arthur at push.am
Sat Aug 25 01:56:42 CEST 2012

I hit the ones that looked most like real bugs and filed a pull request.

Interestingly, the "just strange code" at src\zmq.cpp(489) did seem to
have a real bug, after all.

Thanks for your hard work!


On Fri, Aug 24, 2012 at 3:46 PM, Chernyshev Vyacheslav <astellar at ro.ru> wrote:
> I have run a static analyzer that I have access to. There are a lot of
> warnings about conversions from/to "memsize" type (a data type of C/C++
> languages which is 32-bit on a 32-bit architecture and 64-bit on a 64-bit
> one, i.e. size_t, ptrdiff_t, etc.), about C-style casts, etc. But some hints
> are pretty nice.
> This one is a clear error:
> src\pipe.cpp(193): error V547: Expression is always false. Probably the '||'
> operator should be used here.
> This one is just strange code, there is no need to cast to int:
> src\zmq.cpp(489): error V220: Suspicious sequence of types castings: memsize
> -> 32-bit integer -> memsize. The value being casted: '* count_'.
> A small optimization hint:
> src\yqueue.hpp(48): error V802: On 64-bit platform, structure size can be
> reduced from 56 to 48 bytes by rearranging the fields according to their
> sizes in decreasing order.
> There is also quite a lot of warnings about differences of LP64/LLP64 data
> models for long type. I have attached the whole log. Please note that it is
> extremely verbose as all possible warning levels were turned on.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list