- Fix compile warning in worker pthread id printout.

This commit is contained in:
W.C.A. Wijngaards 2024-07-02 09:44:58 +02:00
parent e54928a628
commit 2fe4e2ec3e
2 changed files with 9 additions and 1 deletions

View File

@ -391,6 +391,13 @@ void server_stats_obtain(struct worker* worker, struct worker* who,
else worker_send_cmd(who, worker_cmd_stats_noreset); else worker_send_cmd(who, worker_cmd_stats_noreset);
verbose(VERB_ALGO, "wait for stats reply"); verbose(VERB_ALGO, "wait for stats reply");
if(tube_wait_timeout(worker->cmd, STATS_THREAD_WAIT) == 0) { if(tube_wait_timeout(worker->cmd, STATS_THREAD_WAIT) == 0) {
#if defined(HAVE_PTHREAD) && defined(SIZEOF_PTHREAD_T) && defined(SIZEOF_UNSIGNED_LONG)
# if SIZEOF_PTHREAD_T == SIZEOF_UNSIGNED_LONG
unsigned long pthid = 0;
if(verbosity >= VERB_OPS)
memcpy(&pthid, &who->thr_id, sizeof(unsigned long));
# endif
#endif
verbose(VERB_OPS, "no response from thread %d" verbose(VERB_OPS, "no response from thread %d"
#ifdef HAVE_GETTID #ifdef HAVE_GETTID
" LWP %u" " LWP %u"
@ -407,7 +414,7 @@ void server_stats_obtain(struct worker* worker, struct worker* who,
#endif #endif
#if defined(HAVE_PTHREAD) && defined(SIZEOF_PTHREAD_T) && defined(SIZEOF_UNSIGNED_LONG) #if defined(HAVE_PTHREAD) && defined(SIZEOF_PTHREAD_T) && defined(SIZEOF_UNSIGNED_LONG)
# if SIZEOF_PTHREAD_T == SIZEOF_UNSIGNED_LONG # if SIZEOF_PTHREAD_T == SIZEOF_UNSIGNED_LONG
, (unsigned long)*((unsigned long*)&who->thr_id) , pthid
# endif # endif
#endif #endif
); );

View File

@ -1,6 +1,7 @@
2 July 2024: Wouter 2 July 2024: Wouter
- Fix to remove unused include from the readzone test program. - Fix to remove unused include from the readzone test program.
- Fix unused variable warning in do_cache_remove. - Fix unused variable warning in do_cache_remove.
- Fix compile warning in worker pthread id printout.
17 June 2024: Wouter 17 June 2024: Wouter
- Fix ip-ratelimit-cookie setting, it was not applied. - Fix ip-ratelimit-cookie setting, it was not applied.