48 lines
2.3 KiB
Diff
48 lines
2.3 KiB
Diff
From 8ef8966237865ec699ab16d208ff56edaac4ff7b Mon Sep 17 00:00:00 2001
|
|
From: Christos Tsantilas <christos@chtsanti.net>
|
|
Date: Fri, 1 Nov 2019 08:00:52 -0700
|
|
Subject: [PATCH] Fix integer printing in various printf to avoid warnings
|
|
about integer sizes
|
|
|
|
Upstream: https://github.com/c-icap/c-icap-server/commit/8ef8966237865ec699ab16d208ff56edaac4ff7b
|
|
|
|
[Bernd: partially backported to 0.5.10]
|
|
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
|
---
|
|
mpmt_server.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/mpmt_server.c b/mpmt_server.c
|
|
index a30d55d4..9b178a66 100644
|
|
--- a/mpmt_server.c
|
|
+++ b/mpmt_server.c
|
|
@@ -74,7 +74,7 @@ typedef struct server_decl {
|
|
|
|
ci_thread_mutex_t threads_list_mtx;
|
|
server_decl_t **threads_list = NULL;
|
|
-ci_thread_t listener_thread_id = -1;
|
|
+ci_thread_t listener_thread_id;
|
|
int listener_running = 0;
|
|
|
|
ci_thread_cond_t free_server_cond;
|
|
@@ -242,8 +242,8 @@ static void cancel_all_threads()
|
|
for (i=0; i<CI_CONF.THREADS_PER_CHILD; i++) {
|
|
if (threads_list[i] != NULL) { /* if the i thread is still alive*/
|
|
if (!threads_list[i]->running) { /*if the i thread is not running any more*/
|
|
- ci_debug_printf(5, "Cancel server %d, thread_id %lu (%d)\n",
|
|
- threads_list[i]->srv_id, threads_list[i]->srv_pthread,
|
|
+ ci_debug_printf(5, "Cancel server %" PRIu64 ", thread_id %" PRIu64 " (%d)\n",
|
|
+ (uint64_t)threads_list[i]->srv_id, (uint64_t)threads_list[i]->srv_pthread,
|
|
i);
|
|
ci_thread_join(threads_list[i]->srv_pthread);
|
|
release_thread_i(i);
|
|
@@ -252,7 +252,7 @@ static void cancel_all_threads()
|
|
/*The thread is still running, and we have a timeout for waiting
|
|
the thread to exit. */
|
|
if (wait_for_workers <= 2) {
|
|
- ci_debug_printf(5, "Thread %ld still running near the timeout. Try to kill it\n", threads_list[i]->srv_pthread);
|
|
+ ci_debug_printf(5, "Thread %" PRIu64 " still running near the timeout. Try to kill it\n", (uint64_t)threads_list[i]->srv_pthread);
|
|
pthread_kill( threads_list[i]->srv_pthread, SIGTERM);
|
|
}
|
|
}
|