Simon Giesecke
0a43c66a32
Problem: magic literals in zap_client.cpp
...
Solution: extracted constants
2018-05-28 18:47:07 +02:00
Simon Giesecke
7c2d1c1824
Problem: magic literals for UCHAR_MAX
...
Solution: use UCHAR_MAX constant instead
2018-05-28 18:46:50 +02:00
Simon Giesecke
a4c817e736
Problem: magic number "2" in socket_base.cpp
...
Solution: calculate from field sizes
2018-05-28 18:45:41 +02:00
Simon Giesecke
d75ec5e055
Problem: produce_* functions always return 0
...
Solution: change return type to void, and remove redundant result checks
2018-05-28 17:53:46 +02:00
Simon Giesecke
7f880c256f
Problem: magic numbers and data duplication in plain_*.cpp
...
Solution: extract constants / move to plain_common.hpp
2018-05-28 17:53:46 +02:00
Simon Giesecke
8269b23e56
Problem: magic numbers and code duplication in msg.cpp
...
Solution: extract constants and unified cases
2018-05-28 17:53:44 +02:00
Simon Giesecke
18000a213f
Problem: magic numbers in mechanism_base.cpp
...
Solution: extract constants
2018-05-28 17:53:44 +02:00
Simon Giesecke
abca9f6bc1
Problem: Magic numbers in plain_server.cpp
...
Solution: introduced constants
2018-05-28 17:53:44 +02:00
Simon Giesecke
2da6629e0f
Problem: Magic numbers "1" and "100" in signaler.cpp
...
Solution: introduced constants, use std::min/std::max instead of control structures
2018-05-28 17:53:43 +02:00
Simon Giesecke
a6060674b4
Problem: Magic numbers "32" and "128" in tcp_address.cpp
...
Solution: introduced constants
2018-05-28 17:53:43 +02:00
Simon Giesecke
93e75fd695
Problem: Magic numbers "6" and "7" in null_mechanism.cpp
...
Solution: introduced constants
2018-05-28 17:53:42 +02:00
Simon Giesecke
c05db7f025
Problem: Magic numbers "1" and "6" in null_mechanism.cpp
...
Solution: introduced constants
2018-05-28 17:53:42 +02:00
Simon Giesecke
ff27dd01f0
Problem: Magic numbers "1" and "4" in mechanism.cpp
...
Solution: introduced constants
2018-05-28 17:53:42 +02:00
Simon Giesecke
7c9d058cdb
Problem: Magic number "2" in ip_resolver.cpp
...
Solution: introduced constant
2018-05-28 17:53:41 +02:00
Simon Giesecke
16bb62e6f7
Problem: ctx_t::_slots is a plain array
...
Solution: use a std::vector instead
2018-05-28 17:53:41 +02:00
Simon Giesecke
a0a60e80ca
Problem: Magic number "2" in ctx.cpp
...
Solution: introduced constant
2018-05-28 17:53:40 +02:00
Simon Giesecke
bbc903884f
Merge pull request #3140 from bluca/clang_tautological
...
Problem: build broken with clang 6 on Android NDK 17
2018-05-28 15:30:42 +02:00
Luca Boccassi
58d13395ec
Problem: clang 6 warns about comparisons on 64 bit
...
Solution: ignore tautological-constant-compare warnings, as they
might be useless on 64 bit but they are not on 32 bit where sizeof
size_t != sizeof uint64_t
2018-05-28 14:06:41 +01:00
Luca Boccassi
624c142365
Problem: static analysis warning about ifdef typo
...
Solution: fix it
2018-05-28 12:32:23 +01:00
Luca Boccassi
2d1bb07f8d
Merge pull request #3139 from sigiesec/style-improvements
...
Code style improvements
2018-05-27 15:44:27 +01:00
Simon Giesecke
779d120fa3
Problem: tests do not follow naming style
...
Solution: apply naming style
2018-05-27 13:24:08 +02:00
Simon Giesecke
d767909b50
Problem: old C-style casts used
...
Solution: replace by static_cast/reinterpret_cast
2018-05-27 13:24:07 +02:00
Simon Giesecke
e3c73d9881
Problem: inconsistent naming style for private data members, conflicts with naming of local variables and member functions
...
Solution: apply and check _lower_case naming style for private data members
2018-05-27 13:24:07 +02:00
Simon Giesecke
06cfd0d8ad
Problem: unclear why QueryPerformanceFrequency is called for every call of QueryPerformanceCounter
...
Solution: add a comment
2018-05-27 13:24:07 +02:00
Simon Giesecke
97ba02bc2f
Problem: redundant empty dtor
...
Solution: removed
2018-05-27 13:24:06 +02:00
Simon Giesecke
6ef67f13e3
Problem: use of C-style casts and magic literals
...
Solution: replace by static_cast, and introduce appropriate constants
2018-05-27 13:24:06 +02:00
Luca Boccassi
089746959d
Merge pull request #3137 from sigiesec/disable-parallel-testing
...
Problem: VS2008/2010/2017 tests fail if run in parallel
2018-05-26 19:19:48 +01:00
Simon Giesecke
0c74e8a0ad
Problem: cmake install is not tested
...
Solution: run cmake --build --target install instead of msbuild to build on appveyor
2018-05-26 18:56:00 +02:00
Simon Giesecke
a1efc68516
Problem: appveyor CI takes a long time
...
Solution: run some builds only on master or *full-ci* branches
2018-05-26 18:56:00 +02:00
Simon Giesecke
33ba7e14b3
Problem: VS2008/2010/2017 tests fail if run in parallel
...
Solution: disabled parallel testing for these VS versions
2018-05-26 18:56:00 +02:00
Luca Boccassi
fae88633d7
Merge pull request #3138 from sigiesec/fix-various-style-issues
...
Fix various code style issues
2018-05-26 12:08:12 +01:00
Simon Giesecke
37344d0b7c
Problem: redundant old-style void argument declarations
...
Solution: remove
2018-05-26 09:34:45 +02:00
Simon Giesecke
12a97bb769
Problem: redundant else after return
...
Solution: remove else
2018-05-26 09:34:45 +02:00
Simon Giesecke
21498700ef
Problem: integer literals assigned to bool variables
...
Solution: replace by bool literals
2018-05-26 09:34:45 +02:00
Simon Giesecke
eacc805646
Problem: complex unnecessary ternary expressions
...
Solution: simplify to comparison against 0
2018-05-26 09:34:44 +02:00
Simon Giesecke
1432011277
Problem: inconsistent local variable naming
...
Solution: configured clang-tidy check and applied fixes
2018-05-26 09:34:44 +02:00
Simon Giesecke
c581f43c97
Problem: parameter naming style inconsistent
...
Solution: define and apply parameter naming style: lower_case_
2018-05-26 09:34:44 +02:00
Luca Boccassi
79d5ac3dee
Merge pull request #3135 from sigiesec/fix-heartbeat-ttl-max
...
Fix ZMQ_HEARTBEAT_TTL maximum value check
2018-05-25 15:57:45 +01:00
Simon Giesecke
763760988f
Problem: VS2008 has no definition of UINT16_MAX
...
Solution: provide definition based on _UI16_MAX
2018-05-25 15:13:07 +02:00
Simon Giesecke
8b030a9256
Problem: no tests for corner cases of setsockopt ZMQ_HEARTBEAT_TTL
...
Solution: added tests
2018-05-25 15:13:07 +02:00
Simon Giesecke
d90e70c1cf
Problem: maximum allowed value for ZMQ_HEARTBEAT_TTL is wrong
...
Solution: use UINT16_MAX
2018-05-25 15:06:11 +02:00
Luca Boccassi
50374bf6f5
Merge pull request #3134 from sigiesec/fix-sonarcloud-component-name
...
Fix sonarcloud component name
2018-05-24 17:05:24 +01:00
Simon Giesecke
b791645a49
Problem: project key is not unique across organizations
...
Solution: prefix project key with repo name
2018-05-24 18:04:43 +02:00
Luca Boccassi
f0f029c549
Merge pull request #3132 from sigiesec/add-vs2008-vs2010-ci
...
Add CI for VS2008 and VS2010 and fix their builds
2018-05-24 17:02:57 +01:00
Simon Giesecke
653c2073de
Merge pull request #3133 from bluca/sonarqube_token
...
Problem: missing sonarqube token
2018-05-24 17:08:34 +02:00
Luca Boccassi
cf41aed29d
Problem: missing sonarqube token
...
Solution: add it
2018-05-24 16:06:08 +01:00
Luca Boccassi
1644d162fb
Merge pull request #3115 from sigiesec/analyze
...
Add static analysis
2018-05-24 16:04:31 +01:00
Simon Giesecke
6afa1cee3a
Problem: travis-ci analysis build is always run
...
Solution: configure to run only on scheduled runs or on specifically named branches
2018-05-24 16:15:58 +02:00
Simon Giesecke
51fd4b6a9d
Problem: analysis build on PR virtual merges
...
Solution: skip analysis build in install stage
2018-05-24 16:15:57 +02:00
Simon Giesecke
100745d312
Problem: appveyor analysis runs on all branches
...
Solution: restrict to specific branches
2018-05-24 16:15:57 +02:00
Simon Giesecke
51d4b00196
Problem: no clang-tidy configuration
...
Solution: add initial .clang-tidy config file
2018-05-24 16:15:30 +02:00
Simon Giesecke
7b686900f9
Problem: VS2008 build fails due to unavailable stdint.h
...
Solution: specify not to use stdint.h for VS<=2008, fixes #3025
2018-05-24 15:56:08 +02:00
Simon Giesecke
1e89a51734
Problem: broken indentation
...
Solution: fix indentation
2018-05-24 15:56:08 +02:00
Simon Giesecke
2ae0c4e2c5
Problem: unnecessarily complex inheritance hierarchy in decoders, warning C4355 with VS2010
...
Solution: make allocator a member of decoder_base_t
2018-05-24 15:17:08 +02:00
Simon Giesecke
d96a030125
Problem: no CI builds for VS2008/VS2010
...
Solution: add to appveyor jobs
2018-05-24 15:17:04 +02:00
Simon Giesecke
4d3516f634
Problem: no static analysis under Linux
...
Solution: activate clang-tidy, scan-build and sonar-scanner
2018-05-24 13:44:46 +02:00
Simon Giesecke
2b31e50b01
Problem: No static analysis under Windows
...
Solution: Enable VS static analyzer and core guideline checks
2018-05-24 13:44:45 +02:00
Luca Boccassi
edd9a0c5c8
Merge pull request #3130 from sigiesec/fix-automake
...
Problem: autotools build broken
2018-05-24 09:22:26 +01:00
Simon Giesecke
b6d36c92a2
Problem: autotools build broken
...
Solution: fix directory reference
2018-05-24 09:09:39 +02:00
Luca Boccassi
f3e7911dd6
Merge pull request #3127 from sigiesec/integrate-wepoll
...
Support epoll polling under Windows with wepoll
2018-05-23 21:15:56 +01:00
Luca Boccassi
a6cfbca3ac
Merge pull request #3128 from sigiesec/fix-test-inproc-connect
...
Problem: test_context_socket is not thread-safe
2018-05-23 18:47:07 +01:00
Simon Giesecke
06e0c0776d
Problem: cmake run is very slow with MSVC
...
Solution: skip tests than can never succeed with MSVC
2018-05-23 18:13:22 +02:00
Luca Boccassi
013958299b
Merge pull request #3129 from sigiesec/deprecate-msvc-sln-builds
...
Problem: prepared Visual Studio solution files are hard to maintain and redundant with CMake builds
2018-05-23 16:47:08 +01:00
Simon Giesecke
64f2b100da
Problem: test_context_socket is not thread-safe
...
Solution: use regular zmq_socket instead in thread functions
2018-05-23 17:32:27 +02:00
Simon Giesecke
af6d70ec72
Problem: prepared Visual Studio solution files are hard to maintain and redundant with CMake builds
...
Solution: declare them as deprecated
2018-05-23 17:26:28 +02:00
Simon Giesecke
9df851225a
Problem: test_radio_dish takes time near timeout
...
Solution: increase timeout
2018-05-23 16:31:05 +02:00
Simon Giesecke
945c79de67
Problem: test cases setting ZMQ_MULTICAST_LOOP to false fail on Windows
...
Solution: disable test cases
2018-05-23 16:26:52 +02:00
Simon Giesecke
57ef8e2e3e
Problem: custom test ignore
...
Solution: use unity mechanism for ignoring with message
2018-05-23 16:26:52 +02:00
Simon Giesecke
2bdf86d6c2
Problem: timeout on test_many_sockets with epoll
...
Solution: increase timeout, remove timeout settings for unsupported poll poller
2018-05-23 16:26:52 +02:00
Simon Giesecke
275a89ac3c
Problem: test_many_sockets does not show number of sockets that could be created
...
Solution: add diagnostic output
2018-05-23 16:25:08 +02:00
Simon Giesecke
bd129e78ff
Problem: test assertion unnecessary complex
...
Solution: use TEST_ASSERT_FAILURE_ERRNO
2018-05-23 16:25:08 +02:00
Simon Giesecke
f5aec6fb27
Problem: no CI build with epoll under Windows
...
Solution: add epoll build job
2018-05-23 16:25:07 +02:00
Simon Giesecke
082b6aa641
Problem: epoll not supported under Windows
...
Solution: Use wepoll on Windows
2018-05-23 16:25:07 +02:00
Simon Giesecke
c62df64bc2
Problem: wepoll source not in repository
...
Solution: import wepoll 1.5.0 source
2018-05-23 16:25:07 +02:00
Luca Boccassi
b56e7f13c5
Merge pull request #3126 from sigiesec/migrate-test-inproc-connect
...
Problem: test_inproc_connect not using test framework
2018-05-23 14:54:33 +01:00
Luca Boccassi
3730833f9d
Merge pull request #3125 from sigiesec/improve-socket-inheritance
...
Improve socket inheritance handling
2018-05-23 13:50:39 +01:00
Simon Giesecke
fdfa907187
Problem: test_inproc_connect not using test framework
...
Solution: migrate to unity
2018-05-23 13:48:58 +02:00
Simon Giesecke
2d9a8955f5
Problem: race condition in making socket non-inheritable
...
Solution: create sockets with WSA_FLAG_NO_HANDLE_INHERIT
2018-05-23 11:23:33 +02:00
Simon Giesecke
44da0e7e42
Problem: code duplication in making sockets non-inheritable
...
Solution: extracted make_socket_noninheritable function
2018-05-23 11:23:33 +02:00
Simon Giesecke
c432aada84
Problem: inconsistent error handling and unnecessary code duplication
...
Solution: make error handling consistent and use retired_fd to remove code duplication
2018-05-23 11:23:33 +02:00
Luca Boccassi
44b0753c5c
Merge pull request #3047 from acsearle/master
...
Allow EBADF on iOS #3046
2018-05-23 09:56:32 +01:00
Luca Boccassi
d02ba13576
Merge pull request #3122 from sigiesec/test-migrations
...
Migrated some more tests to unity and fixed some more code style issues
2018-05-22 20:37:34 +01:00
Luca Boccassi
6c106d3930
Merge pull request #3121 from sigiesec/split-poller-config
...
Split poller config and disable 'poll' poller on Windows for I/O thread polling
2018-05-22 19:31:05 +01:00
Simon Giesecke
440be28d7e
Problem: unnecessary non-const variables
...
Solution: add const
2018-05-22 18:46:40 +02:00
Simon Giesecke
d6952ded71
Problem: unused include directives and redundant forward declarations
...
Solution: removed
2018-05-22 18:46:40 +02:00
Simon Giesecke
04ec6aaf28
Problem: malloc call may fail
...
Solution: add alloc_assert
2018-05-22 18:46:40 +02:00
Simon Giesecke
18eabed6ea
Problem: I/O thread poll poller build unsupported
...
Solution: use API_POLLER=poll instead of POLLER=poll
2018-05-22 18:36:04 +02:00
Simon Giesecke
d326434b37
Problem: API poller cannot be set independently from I/O thread poller, poll I/O thread poller broken on Windows
...
Solution: change platform definitions to separate API poller from I/O thread poller, disallow configuring poll I/O thread poller on Windows
2018-05-22 18:36:04 +02:00
Simon Giesecke
ad100b0b9f
Problem: test_xpub_nodrop not using test framework
...
Solution: migrate to unity
2018-05-22 18:33:18 +02:00
Simon Giesecke
f13377de05
Problem: test_pub_invert_matching failing
...
Solution: insert some sleeps to remedy timing dependencies
2018-05-22 18:33:18 +02:00
Simon Giesecke
12c6ae2283
Problem: test_pub_invert_matching not using test framework
...
Solution: migrate to unity
2018-05-22 18:33:18 +02:00
Simon Giesecke
fa467d3425
Problem: test_hwm_pubsub not using test framework
...
Solution: migrate to unity
2018-05-22 18:33:17 +02:00
Simon Giesecke
ee85957dc4
Problem: no test case for polling pending connect that ultimately fails
...
Solution: added test case, reproduces the likely cause for #3107
2018-05-22 18:21:06 +02:00
Bill Torpey
8ad0d5896e
prevent duplicate connections from PUB sockets also (see https://gith … ( #3117 )
...
* Update zmq_connect documentation to mention issue of multiple connects to the same endpoint
2018-05-22 16:05:32 +01:00
Luca Boccassi
c178193c50
Merge pull request #3116 from sigiesec/fix-some-more-style-issues
...
Fix some more code style issues
2018-05-18 17:53:34 +01:00
Simon Giesecke
4e616f30dd
Problem: C-style casts used
...
Solution: replace by C++-style casts
2018-05-18 17:04:01 +02:00
Simon Giesecke
d002eb5578
Problem: analyzer does not know that zmq_abort does not return
...
Solution: add no-return attributes
2018-05-18 16:25:24 +02:00
Simon Giesecke
7b3acd47b2
Problem: malloc may fail in blob_t ctors
...
Solution: add alloc_assert calls
2018-05-18 16:25:24 +02:00
Simon Giesecke
9da0c6d62f
Problem: goto jumping backwards
...
Solution: replace by for loop
2018-05-18 14:34:43 +02:00
Simon Giesecke
62e48f837d
Problem: assignment within complex condition
...
Solution: restructured code, inverted condition
2018-05-18 14:34:43 +02:00