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
90b6c102
Commit
90b6c102
authored
Aug 19, 2017
by
Luca Boccassi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: various unused variables warnings
Solution: use LIBZMQ_UNUSED where necessary
parent
e81a40b8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
0 deletions
+37
-0
ip.cpp
src/ip.cpp
+3
-0
pgm_receiver.cpp
src/pgm_receiver.cpp
+1
-0
pgm_sender.cpp
src/pgm_sender.cpp
+2
-0
test_security_curve.cpp
tests/test_security_curve.cpp
+21
-0
testutil.hpp
tests/testutil.hpp
+2
-0
testutil_security.hpp
tests/testutil_security.hpp
+8
-0
No files found.
src/ip.cpp
View file @
90b6c102
...
...
@@ -228,5 +228,8 @@ void zmq::bind_to_device (fd_t s_, std::string &bound_device_)
#else
errno_assert
(
rc
==
0
);
#endif
#else
LIBZMQ_UNUSED
(
s_
);
LIBZMQ_UNUSED
(
bound_device_
);
#endif
}
src/pgm_receiver.cpp
View file @
90b6c102
...
...
@@ -67,6 +67,7 @@ int zmq::pgm_receiver_t::init (bool udp_encapsulation_, const char *network_)
void
zmq
::
pgm_receiver_t
::
plug
(
io_thread_t
*
io_thread_
,
session_base_t
*
session_
)
{
LIBZMQ_UNUSED
(
io_thread_
);
// Retrieve PGM fds and start polling.
fd_t
socket_fd
=
retired_fd
;
fd_t
waiting_pipe_fd
=
retired_fd
;
...
...
src/pgm_sender.cpp
View file @
90b6c102
...
...
@@ -39,6 +39,7 @@
#include "err.hpp"
#include "wire.hpp"
#include "stdint.hpp"
#include "macros.hpp"
zmq
::
pgm_sender_t
::
pgm_sender_t
(
io_thread_t
*
parent_
,
const
options_t
&
options_
)
:
...
...
@@ -73,6 +74,7 @@ int zmq::pgm_sender_t::init (bool udp_encapsulation_, const char *network_)
void
zmq
::
pgm_sender_t
::
plug
(
io_thread_t
*
io_thread_
,
session_base_t
*
session_
)
{
LIBZMQ_UNUSED
(
io_thread_
);
// Allocate 2 fds for PGM socket.
fd_t
downlink_socket_fd
=
retired_fd
;
fd_t
uplink_socket_fd
=
retired_fd
;
...
...
tests/test_security_curve.cpp
View file @
90b6c102
...
...
@@ -140,6 +140,8 @@ void test_curve_security_with_valid_credentials (
void
test_curve_security_with_bogus_client_credentials
(
void
*
ctx
,
char
*
my_endpoint
,
void
*
server
,
void
*
server_mon
,
int
timeout
)
{
LIBZMQ_UNUSED
(
timeout
);
// This must be caught by the ZAP handler
char
bogus_public
[
41
];
char
bogus_secret
[
41
];
...
...
@@ -278,6 +280,9 @@ void test_curve_security_invalid_hello_wrong_length (char *my_endpoint,
void
*
server_mon
,
int
timeout
)
{
LIBZMQ_UNUSED
(
server
);
LIBZMQ_UNUSED
(
timeout
);
int
s
=
connect_vanilla_socket
(
my_endpoint
);
// send GREETING
...
...
@@ -352,6 +357,9 @@ void test_curve_security_invalid_hello_command_name (char *my_endpoint,
void
*
server_mon
,
int
timeout
)
{
LIBZMQ_UNUSED
(
server
);
LIBZMQ_UNUSED
(
timeout
);
int
s
=
connect_vanilla_socket
(
my_endpoint
);
send_greeting
(
s
);
...
...
@@ -380,6 +388,9 @@ void test_curve_security_invalid_hello_version (char *my_endpoint,
void
*
server_mon
,
int
timeout
)
{
LIBZMQ_UNUSED
(
server
);
LIBZMQ_UNUSED
(
timeout
);
int
s
=
connect_vanilla_socket
(
my_endpoint
);
send_greeting
(
s
);
...
...
@@ -455,6 +466,8 @@ void test_curve_security_invalid_initiate_length (char *my_endpoint,
void
*
server_mon
,
int
timeout
)
{
LIBZMQ_UNUSED
(
server
);
zmq
::
curve_client_tools_t
tools
=
make_curve_client_tools
();
int
s
=
connect_exchange_greeting_and_send_hello
(
my_endpoint
,
tools
);
...
...
@@ -465,6 +478,8 @@ void test_curve_security_invalid_initiate_length (char *my_endpoint,
#ifdef ZMQ_BUILD_DRAFT_API
int
res
=
get_monitor_event_with_timeout
(
server_mon
,
NULL
,
NULL
,
timeout
);
assert
(
res
==
-
1
);
#else
LIBZMQ_UNUSED
(
timeout
);
#endif
send
(
s
,
"
\x04\x09\x08
INITIATE"
);
...
...
@@ -508,6 +523,8 @@ void test_curve_security_invalid_initiate_command_name (char *my_endpoint,
void
*
server_mon
,
int
timeout
)
{
LIBZMQ_UNUSED
(
server
);
zmq
::
curve_client_tools_t
tools
=
make_curve_client_tools
();
int
s
=
connect_exchange_greeting_and_hello_welcome
(
my_endpoint
,
server_mon
,
timeout
,
tools
);
...
...
@@ -531,6 +548,8 @@ void test_curve_security_invalid_initiate_command_name (char *my_endpoint,
void
test_curve_security_invalid_initiate_command_encrypted_cookie
(
char
*
my_endpoint
,
void
*
server
,
void
*
server_mon
,
int
timeout
)
{
LIBZMQ_UNUSED
(
server
);
zmq
::
curve_client_tools_t
tools
=
make_curve_client_tools
();
int
s
=
connect_exchange_greeting_and_hello_welcome
(
my_endpoint
,
server_mon
,
timeout
,
tools
);
...
...
@@ -554,6 +573,8 @@ void test_curve_security_invalid_initiate_command_encrypted_cookie (
void
test_curve_security_invalid_initiate_command_encrypted_content
(
char
*
my_endpoint
,
void
*
server
,
void
*
server_mon
,
int
timeout
)
{
LIBZMQ_UNUSED
(
server
);
zmq
::
curve_client_tools_t
tools
=
make_curve_client_tools
();
int
s
=
connect_exchange_greeting_and_hello_welcome
(
my_endpoint
,
server_mon
,
timeout
,
tools
);
...
...
tests/testutil.hpp
View file @
90b6c102
...
...
@@ -86,6 +86,8 @@
# endif
#endif
#define LIBZMQ_UNUSED(object) (void)object
// Bounce a message from client to server and back
// For REQ/REP or DEALER/DEALER pairs only
void
...
...
tests/testutil_security.hpp
View file @
90b6c102
...
...
@@ -41,10 +41,14 @@ const char *test_zap_domain = "ZAPTEST";
// NULL specific functions
void
socket_config_null_client
(
void
*
server
,
void
*
server_secret
)
{
LIBZMQ_UNUSED
(
server
);
LIBZMQ_UNUSED
(
server_secret
);
}
void
socket_config_null_server
(
void
*
server
,
void
*
server_secret
)
{
LIBZMQ_UNUSED
(
server_secret
);
int
rc
=
zmq_setsockopt
(
server
,
ZMQ_ZAP_DOMAIN
,
test_zap_domain
,
7
);
assert
(
rc
==
0
);
}
...
...
@@ -55,6 +59,8 @@ const char *test_plain_password = "testpass";
void
socket_config_plain_client
(
void
*
server
,
void
*
server_secret
)
{
LIBZMQ_UNUSED
(
server_secret
);
int
rc
=
zmq_setsockopt
(
server
,
ZMQ_PLAIN_PASSWORD
,
test_plain_password
,
8
);
assert
(
rc
==
0
);
...
...
@@ -64,6 +70,8 @@ void socket_config_plain_client (void *server, void *server_secret)
void
socket_config_plain_server
(
void
*
server
,
void
*
server_secret
)
{
LIBZMQ_UNUSED
(
server_secret
);
int
as_server
=
1
;
int
rc
=
zmq_setsockopt
(
server
,
ZMQ_PLAIN_SERVER
,
&
as_server
,
sizeof
(
int
));
assert
(
rc
==
0
);
...
...
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