zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject zookeeper git commit: ZOOKEEPER-3078: remove print_completion_queue
Date Tue, 10 Jul 2018 10:58:40 GMT
Repository: zookeeper
Updated Branches:
  refs/heads/master 5d187ff0a -> 32e4a1676


ZOOKEEPER-3078: remove print_completion_queue

The fprintf(LOGSTREAM, ...) calls cause compiler errors when building
with GCC 8: "error: null argument where non-null required".  This is
because since ZOOKEEPER-1400 (2013-05-19 commit 37973fab: Allow logging
via callback instead of raw FILE pointer) LOGSTREAM is defined as NULL.
However, the last use of print_completion_queue was removed 2008-01-10
in commit ffc4b0d4 (Changed zoo_get() signature, changed the watcher
callback signature, fixed zookeeper_close() resource leaks and race
conditions, fixed the race condition causing xid mismatch).  So we can
avoid the compiler errors by just removing print_completion_queue.

Signed-off-by: Kent R. Spillner <kspillneracm.org>

Author: Kent R. Spillner <kspillner@acm.org>

Reviewers: Norbert Kalmar <nkalmar@cloudera.com>, Andor Molnár <andor@apache.org>,
Benjamin Reed <breed@apache.org>

Closes #558 from sl4mmy/zookeeper-3078


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/32e4a167
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/32e4a167
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/32e4a167

Branch: refs/heads/master
Commit: 32e4a1676656df57f9c73a249cb88bed5cb927ee
Parents: 5d187ff
Author: Kent R. Spillner <kspillner@acm.org>
Authored: Tue Jul 10 03:58:32 2018 -0700
Committer: benjamin reed <breed@apache.org>
Committed: Tue Jul 10 03:58:32 2018 -0700

----------------------------------------------------------------------
 src/c/src/zookeeper.c | 22 ----------------------
 1 file changed, 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/32e4a167/src/c/src/zookeeper.c
----------------------------------------------------------------------
diff --git a/src/c/src/zookeeper.c b/src/c/src/zookeeper.c
index 0db547e..d38e172 100644
--- a/src/c/src/zookeeper.c
+++ b/src/c/src/zookeeper.c
@@ -253,8 +253,6 @@ static void cleanup_bufs(zhandle_t *zh,int callCompletion,int rc);
 static int disable_conn_permute=0; // permute enabled by default
 static struct sockaddr_storage *addr_rw_server = 0;
 
-static __attribute__((unused)) void print_completion_queue(zhandle_t *zh);
-
 static void *SYNCHRONOUS_MARKER = (void*)&SYNCHRONOUS_MARKER;
 static int isValidPath(const char* path, const int flags);
 
@@ -2530,26 +2528,6 @@ int api_epilog(zhandle_t *zh,int rc)
     return rc;
 }
 
-static __attribute__((unused)) void print_completion_queue(zhandle_t *zh)
-{
-    completion_list_t* cptr;
-
-    if(logLevel<ZOO_LOG_LEVEL_DEBUG) return;
-
-    fprintf(LOGSTREAM,"Completion queue: ");
-    if (zh->sent_requests.head==0) {
-        fprintf(LOGSTREAM,"empty\n");
-        return;
-    }
-
-    cptr=zh->sent_requests.head;
-    while(cptr){
-        fprintf(LOGSTREAM,"%d,",cptr->xid);
-        cptr=cptr->next;
-    }
-    fprintf(LOGSTREAM,"end\n");
-}
-
 //#ifdef THREADED
 // IO thread queues session events to be processed by the completion thread
 static int queue_session_event(zhandle_t *zh, int state)


Mime
View raw message