After closer look to the sources I can see that asserts are messed a little bit.
Issue #3: All source under src/ should user ZMQ asserts like: zmq_assert, errno_assert, posix_assert, etc. Some of them still using assert.
Issue #4: include/zmq.hpp uses ZMQ_ASSERT to prevent warnings when build with NDEBUG. But this is a main ZMQ header and it should not provide any additional macros until there is a real need.
Get latest zeromq2-x from git.
run:
autogen.sh
./configure
make CXXFLAGS="-Wall -Werror -DNDEBUG"
This will cause next compilation problems:
Issue #1:
make[1]: Entering directory `zeromq2-x/build.vitaliy/tests'
CXX test_pair_inproc.o
cc1plus: warnings being treated as errors
In file included from ../../tests/test_pair_inproc.cpp:21:
../../tests/testutil.hpp: In function ‘void zmqtestutil::basic_tests(const char*, int, int)’:
../../tests/testutil.hpp:114: error: unused variable ‘rc’
make[1]: *** [test_pair_inproc.o] Error 1
make[1]: Leaving directory `zeromq2-x/build.vitaliy/tests'
make: *** [all-recursive] Error 1
Issue #2:
cc1plus: warnings being treated as errors
../../tests/test_hwm.cpp: In function ‘int main(int, char**)’:
../../tests/test_hwm.cpp:47: error: unused variable ‘sent’
../../tests/test_hwm.cpp:60: error: unused variable ‘received’
../../tests/test_hwm.cpp:64: error: unused variable ‘sent’
make[1]: *** [test_hwm.o] Error 1
make[1]: Leaving directory `zeromq2-x/build.vitaliy/tests'
make: *** [all-recursive] Error 1
After closer look to the sources I can see that asserts are messed a little bit.
Issue #3:
All source under src/ should user ZMQ asserts like:
zmq_assert, errno_assert, posix_assert, etc.
Some of them still using assert.
Issue #4:
include/zmq.hpp
uses ZMQ_ASSERT to prevent warnings when build with NDEBUG.
But this is a main ZMQ header and it should not provide any additional macros until there is a real need.