Browse Source

Fix type warnings in debug strings

master
Dirk Engling 3 months ago
parent
commit
3a2a711a29
  1. 2
      opentracker.c
  2. 2
      ot_http.c
  3. 8
      ot_mutex.c

2
opentracker.c

@ -217,7 +217,7 @@ static void handle_write( const int64 sock ) {
chunked = 1; chunked = 1;
for( i = 0; i < cookie->batches; ++i ) { for( i = 0; i < cookie->batches; ++i ) {
fprintf(stderr, "handle_write inspects batch %d of %d (bytes left: %d)\n", i, cookie->batches, cookie->batch[i].bytesleft); fprintf(stderr, "handle_write inspects batch %zu of %zu (bytes left: %llu)\n", i, cookie->batches, cookie->batch[i].bytesleft);
if( cookie->batch[i].bytesleft ) { if( cookie->batch[i].bytesleft ) {
int64 res = iob_send( sock, cookie->batch + i ); int64 res = iob_send( sock, cookie->batch + i );

2
ot_http.c

@ -185,7 +185,7 @@ fprintf(stderr, "http_sendiovecdata sending %d iovec entries found cookie->batch
for( i=0; i<iovec_entries; ++i ) { for( i=0; i<iovec_entries; ++i ) {
/* If the current batch's limit is reached, try to reallocate a new batch to work on */ /* If the current batch's limit is reached, try to reallocate a new batch to work on */
if( current->bytesleft > OT_BATCH_LIMIT ) { if( current->bytesleft > OT_BATCH_LIMIT ) {
fprintf(stderr, "http_sendiovecdata found batch above limit: %zd\n", current->bytesleft); fprintf(stderr, "http_sendiovecdata found batch above limit: %llu\n", current->bytesleft);
io_batch * new_batch = realloc( cookie->batch, (cookie->batches + 1) * sizeof(io_batch) ); io_batch * new_batch = realloc( cookie->batch, (cookie->batches + 1) * sizeof(io_batch) );
if( new_batch ) { if( new_batch ) {
cookie->batch = new_batch; cookie->batch = new_batch;

8
ot_mutex.c

@ -205,12 +205,12 @@ int mutex_workqueue_pushchunked(ot_taskid taskid, struct iovec *iovec) {
for (task = tasklist; task; task = task->next) for (task = tasklist; task; task = task->next)
if (task->taskid == taskid) { if (task->taskid == taskid) {
if( iovec ) { if( iovec ) {
fprintf(stderr, "mutex_workqueue_pushchunked pushing on taskid %d\n", taskid); fprintf(stderr, "mutex_workqueue_pushchunked pushing on taskid %lu\n", taskid);
if (!iovec_append(&task->iovec_entries, &task->iovec, iovec) ) if (!iovec_append(&task->iovec_entries, &task->iovec, iovec) )
return -1; return -1;
task->tasktype = TASK_DONE_PARTIAL; task->tasktype = TASK_DONE_PARTIAL;
} else { } else {
fprintf(stderr, "mutex_workqueue_pushchunked finished taskid %d\n", taskid); fprintf(stderr, "mutex_workqueue_pushchunked finished taskid %lu\n", taskid);
task->tasktype = TASK_DONE; task->tasktype = TASK_DONE;
} }
break; break;
@ -221,7 +221,7 @@ fprintf(stderr, "mutex_workqueue_pushchunked finished taskid %d\n", taskid);
io_trywrite( g_self_pipe[1], &byte, 1 ); io_trywrite( g_self_pipe[1], &byte, 1 );
if(!task) if(!task)
fprintf(stderr, "mutex_workqueue_pushchunked taskid %d not found\n", taskid); fprintf(stderr, "mutex_workqueue_pushchunked taskid %lu not found\n", taskid);
/* Indicate whether the worker has to throw away results */ /* Indicate whether the worker has to throw away results */
return task ? 0 : -1; return task ? 0 : -1;
@ -240,7 +240,7 @@ int64 mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovec, int
for (task = &tasklist; *task; task = &((*task)->next)) for (task = &tasklist; *task; task = &((*task)->next))
if (((*task)->tasktype & TASK_CLASS_MASK ) == TASK_DONE) { if (((*task)->tasktype & TASK_CLASS_MASK ) == TASK_DONE) {
struct ot_task *ptask = *task; struct ot_task *ptask = *task;
fprintf(stderr, "Got task %d type %d with %d entries\n", (*task)->taskid, (*task)->tasktype, ptask->iovec_entries); fprintf(stderr, "Got task %lu type %d with %d entries\n", (*task)->taskid, (*task)->tasktype, ptask->iovec_entries);
*iovec_entries = ptask->iovec_entries; *iovec_entries = ptask->iovec_entries;
*iovec = ptask->iovec; *iovec = ptask->iovec;
sock = ptask->sock; sock = ptask->sock;

Loading…
Cancel
Save