You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/05/08 19:26:21 UTC

qpid-proton git commit: PROTON-1460: fix compile errors in epoll.c on travis, clang.

Repository: qpid-proton
Updated Branches:
  refs/heads/master e28859b9a -> 4b33c423c


PROTON-1460: fix compile errors in epoll.c on travis, clang.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/4b33c423
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/4b33c423
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/4b33c423

Branch: refs/heads/master
Commit: 4b33c423c5d5f2c3cfc50b7c4ea29b67f9e57a0e
Parents: e28859b
Author: Alan Conway <ac...@redhat.com>
Authored: Mon May 8 15:19:18 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon May 8 15:23:23 2017 -0400

----------------------------------------------------------------------
 proton-c/src/proactor/epoll.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4b33c423/proton-c/src/proactor/epoll.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proactor/epoll.c b/proton-c/src/proactor/epoll.c
index 2545045..3b71eac 100644
--- a/proton-c/src/proactor/epoll.c
+++ b/proton-c/src/proactor/epoll.c
@@ -364,7 +364,8 @@ static bool wake(pcontext_t *ctx) {
 // part2: make OS call without lock held
 static inline void wake_notify(pcontext_t *ctx) {
   uint64_t increment = 1;
-  write(ctx->proactor->eventfd, &increment, sizeof(uint64_t));  // TODO: check for error
+  int err = write(ctx->proactor->eventfd, &increment, sizeof(uint64_t));
+  (void)err;  // TODO: check for error
 }
 
 // call with no locks
@@ -384,7 +385,8 @@ static pcontext_t *wake_pop_front(pn_proactor_t *p) {
        * Note that if the reads/writes happen out of order, the wake
        * mechanism will hang. */
       uint64_t ignored;
-      read(p->eventfd, &ignored, sizeof(uint64_t)); // TODO: check for error
+      int err = read(p->eventfd, &ignored, sizeof(uint64_t));
+      (void)err; // TODO: check for error
       p->wakes_in_progress = false;
     }
   }
@@ -885,7 +887,7 @@ static pn_event_batch_t *pconnection_process(pconnection_t *pc, uint32_t events,
 
   if (!pconnection_rclosed(pc)) {
     pn_rwbytes_t rbuf = pn_connection_driver_read_buffer(&pc->driver);
-    if (rbuf.size >= 0 && !pc->read_blocked) {
+    if (rbuf.size > 0 && !pc->read_blocked) {
       ssize_t n = read(pc->psocket.sockfd, rbuf.start, rbuf.size);
 
       if (n > 0) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org