diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-20 17:47:02 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-20 17:47:02 -0800 |
| commit | 4a24ebe175bc3eebf7fbf2ac581b2339a809ace1 (patch) | |
| tree | b3048d482412379ff44c1d2217ca512339a771f6 /tests | |
| parent | cb7e65fd5004fd24a7c23137e849c2828d2de6c3 (diff) | |
| download | nng-4a24ebe175bc3eebf7fbf2ac581b2339a809ace1.tar.gz nng-4a24ebe175bc3eebf7fbf2ac581b2339a809ace1.tar.bz2 nng-4a24ebe175bc3eebf7fbf2ac581b2339a809ace1.zip | |
Dangling compiler warnings from sock handle change.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/event.c | 2 | ||||
| -rw-r--r-- | tests/pipeline.c | 8 | ||||
| -rw-r--r-- | tests/pubsub.c | 8 | ||||
| -rw-r--r-- | tests/sock.c | 16 | ||||
| -rw-r--r-- | tests/survey.c | 6 |
5 files changed, 12 insertions, 28 deletions
diff --git a/tests/event.c b/tests/event.c index f6e0ab3a..30e8f438 100644 --- a/tests/event.c +++ b/tests/event.c @@ -16,7 +16,7 @@ #define CHECKSTR(m, s) So(nng_msg_len(m) == strlen(s));\ So(memcmp(nng_msg_body(m), s, strlen(s)) == 0) struct evcnt { - nng_socket *sock; + nng_socket sock; int readable; int writeable; int pipeadd; diff --git a/tests/pipeline.c b/tests/pipeline.c index 688c48bf..aa01c2d1 100644 --- a/tests/pipeline.c +++ b/tests/pipeline.c @@ -26,7 +26,6 @@ Main({ nng_socket push; So(nng_open(&push, NNG_PROTO_PUSH) == 0); - So(push != NULL); Reset({ nng_close(push); @@ -46,7 +45,6 @@ Main({ Convey("We can create a PULL socket", { nng_socket pull; So(nng_open(&pull, NNG_PROTO_PULL) == 0); - So(pull != NULL); Reset({ nng_close(pull); @@ -66,9 +64,9 @@ Main({ }) Convey("We can create a linked PUSH/PULL pair", { - nng_socket push = NULL; - nng_socket pull = NULL; - nng_socket what = NULL; + nng_socket push; + nng_socket pull; + nng_socket what; So(nng_open(&push, NNG_PROTO_PUSH) == 0); So(nng_open(&pull, NNG_PROTO_PULL) == 0); diff --git a/tests/pubsub.c b/tests/pubsub.c index 12355554..431d6980 100644 --- a/tests/pubsub.c +++ b/tests/pubsub.c @@ -27,7 +27,6 @@ Main({ nng_socket pub; So(nng_open(&pub, NNG_PROTO_PUB) == 0); - So(pub != NULL); Reset({ nng_close(pub); @@ -47,7 +46,6 @@ Main({ Convey("We can create a SUB socket", { nng_socket sub; So(nng_open(&sub, NNG_PROTO_SUB) == 0); - So(sub != NULL); Reset({ nng_close(sub); @@ -70,11 +68,9 @@ Main({ nng_socket pub; nng_socket sub; - So((rv = nng_open(&pub, NNG_PROTO_PUB)) == 0); - So(pub != NULL); + So(nng_open(&pub, NNG_PROTO_PUB) == 0); - So((rv = nng_open(&sub, NNG_PROTO_SUB)) == 0); - So(sub != NULL); + So(nng_open(&sub, NNG_PROTO_SUB) == 0); Reset({ nng_close(pub); diff --git a/tests/sock.c b/tests/sock.c index 9ceb99cb..a41a0093 100644 --- a/tests/sock.c +++ b/tests/sock.c @@ -20,11 +20,9 @@ Main({ Convey("We are able to open a PAIR socket", { int rv; - nng_socket sock = NULL; + nng_socket sock; - rv = nng_open(&sock, NNG_PROTO_PAIR); - So(rv == 0); - So(sock != NULL); + So(nng_open(&sock, NNG_PROTO_PAIR) == 0); Reset({ nng_close(sock); @@ -137,9 +135,8 @@ Main({ }) Convey("We can connect to it", { - nng_socket *sock2 = NULL; - rv = nng_open(&sock2, NNG_PROTO_PAIR); - So(rv == 0); + nng_socket sock2; + So(nng_open(&sock2, NNG_PROTO_PAIR) == 0); rv = nng_dial(sock2, "inproc://here", NULL, NNG_FLAG_SYNCH); So(rv == 0); nng_close(sock2); @@ -147,13 +144,12 @@ Main({ }) Convey("We can send and receive messages", { - nng_socket sock2 = NULL; + nng_socket sock2; int len = 1; nng_msg *msg; uint64_t second = 1000000; - rv = nng_open(&sock2, NNG_PROTO_PAIR); - So(rv == 0); + So(nng_open(&sock2, NNG_PROTO_PAIR) == 0); rv = nng_setopt(sock, NNG_OPT_RCVBUF, &len, sizeof (len)); So(rv == 0); diff --git a/tests/survey.c b/tests/survey.c index 9ce7f20b..a7dd3cca 100644 --- a/tests/survey.c +++ b/tests/survey.c @@ -27,7 +27,6 @@ Main({ nng_socket surv; So(nng_open(&surv, NNG_PROTO_SURVEYOR) == 0); - So(surv != NULL); Reset({ nng_close(surv); @@ -57,7 +56,6 @@ Main({ Convey("We can create a RESPONDENT socket", { nng_socket resp; So(nng_open(&resp, NNG_PROTO_RESPONDENT) == 0); - So(resp != NULL); Reset({ nng_close(resp); @@ -83,11 +81,7 @@ Main({ uint64_t expire; So(nng_open(&surv, NNG_PROTO_SURVEYOR) == 0); - So(surv != NULL); - So(nng_open(&resp, NNG_PROTO_RESPONDENT) == 0); - So(resp != NULL); - Reset({ nng_close(surv); |
