Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
d437d668
Commit
d437d668
authored
6 years ago
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: MSVC warnings in connection with poll
Solution: handle types properly
parent
e447f058
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
poll.cpp
src/poll.cpp
+6
-1
socket_poller.cpp
src/socket_poller.cpp
+4
-1
zmq.cpp
src/zmq.cpp
+2
-1
No files found.
src/poll.cpp
View file @
d437d668
...
...
@@ -43,6 +43,10 @@
#include "config.hpp"
#include "i_poll_events.hpp"
#ifdef ZMQ_HAVE_WINDOWS
typedef
unsigned
long
nfds_t
;
#endif
zmq
::
poll_t
::
poll_t
(
const
zmq
::
thread_ctx_t
&
ctx_
)
:
worker_poller_base_t
(
ctx_
),
retired
(
false
)
...
...
@@ -155,7 +159,8 @@ void zmq::poll_t::loop ()
}
// Wait for events.
int
rc
=
poll
(
&
pollset
[
0
],
pollset
.
size
(),
timeout
?
timeout
:
-
1
);
int
rc
=
poll
(
&
pollset
[
0
],
static_cast
<
nfds_t
>
(
pollset
.
size
()),
timeout
?
timeout
:
-
1
);
#ifdef ZMQ_HAVE_WINDOWS
wsa_assert
(
rc
!=
SOCKET_ERROR
);
#else
...
...
This diff is collapsed.
Click to expand it.
src/socket_poller.cpp
View file @
d437d668
...
...
@@ -31,6 +31,8 @@
#include "socket_poller.hpp"
#include "err.hpp"
#include <limits.h>
static
bool
is_thread_safe
(
zmq
::
socket_base_t
&
socket
)
{
// do not use getsockopt here, since that would fail during context termination
...
...
@@ -575,7 +577,8 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *events_,
else
if
(
timeout_
<
0
)
timeout
=
-
1
;
else
timeout
=
end
-
now
;
timeout
=
static_cast
<
int
>
(
std
::
min
<
uint64_t
>
(
end
-
now
,
INT_MAX
));
// Wait for events.
while
(
true
)
{
...
...
This diff is collapsed.
Click to expand it.
src/zmq.cpp
View file @
d437d668
...
...
@@ -867,7 +867,8 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
else
if
(
timeout_
<
0
)
timeout
=
-
1
;
else
timeout
=
end
-
now
;
timeout
=
static_cast
<
int
>
(
std
::
min
<
uint64_t
>
(
end
-
now
,
INT_MAX
));
// Wait for events.
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment