Commit 6a8dc38
authored
Store zmq_timers_timeout() result in long, not int (#681)
[why]
When compiling with -Wconversion, gcc 13.3 issues a warning:
zmq.hpp: In member function ‘zmq::timers::timeout_result_t zmq::timers::timeout() const’:
zmq.hpp:2857:41: warning: conversion from ‘long int’ to ‘int’ may change value [-Wconversion]
2857 | int timeout = zmq_timers_timeout(_timers);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~
zmq_timers_timeout() returns long, but its return value is stored in an
int variable, which may or may not be a mismatch depending on compiler
and architecture.
[how]
Simply adjust the type of the variable from int to long. We could also
change the literal in the following comparison from -1 to -1L, but that
seems pedantic and does not match the style of the surrounding code.
Signed-off-by: Lars Froehlich <[email protected]>1 parent 9b6b5dd commit 6a8dc38
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2928 | 2928 | | |
2929 | 2929 | | |
2930 | 2930 | | |
2931 | | - | |
| 2931 | + | |
2932 | 2932 | | |
2933 | 2933 | | |
2934 | 2934 | | |
| |||
0 commit comments