Skip to content

Commit

Permalink
Fix warnings introduced by define _GNU_SOURCE change
Browse files Browse the repository at this point in the history
The change to define _GNU_SOURCE means that the compiler knows that
syscall returns a long, not an int -- so then it warns about the wrong
format characters for printing that value.
  • Loading branch information
val-ms committed Nov 23, 2022
1 parent 6e8b2ab commit e0be839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clamonacc/c-thread-pool/thpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,14 +471,14 @@ static struct job* jobqueue_pull(jobqueue* jobqueue_p){
break;

case 1: /* if one job in queue */
logg(LOGG_DEBUG_NV, "jobqueue_pull: Thread %d pulled last job from queue.\n", syscall(SYS_gettid));
logg(LOGG_DEBUG_NV, "jobqueue_pull: Thread %ld pulled last job from queue.\n", syscall(SYS_gettid));
jobqueue_p->front = NULL;
jobqueue_p->rear = NULL;
jobqueue_p->len = 0;
break;

default: /* if >1 jobs in queue */
logg(LOGG_DEBUG_NV, "jobqueue_pull: Thread %d pulled a job from queue.\n", syscall(SYS_gettid));
logg(LOGG_DEBUG_NV, "jobqueue_pull: Thread %ld pulled a job from queue.\n", syscall(SYS_gettid));
jobqueue_p->front = job_p->prev;
jobqueue_p->len--;
/* more than one job in queue -> post it */
Expand Down

0 comments on commit e0be839

Please sign in to comment.