fix size_t format specifiers

This commit is contained in:
Vincent Sanders 2018-08-18 23:44:15 +01:00
parent a6c595f4f3
commit 5f1defd4a7
3 changed files with 38 additions and 23 deletions

View File

@ -3617,8 +3617,8 @@ layout_line(struct box *first,
NSLOG(layout, DEBUG, NSLOG(layout, DEBUG,
"splitting: split_box %p \"%.*s\", spilt %zu, w %i, " "splitting: split_box %p \"%.*s\", spilt %"PRIsizet
"left %p, right %p, inline_count %u", ", w %i, left %p, right %p, inline_count %u",
split_box, split_box,
(int)split_box->length, (int)split_box->length,
split_box->text, split_box->text,
@ -3689,7 +3689,8 @@ layout_line(struct box *first,
/* fit as many words as possible */ /* fit as many words as possible */
assert(split != 0); assert(split != 0);
NSLOG(layout, DEBUG, "'%.*s' %i %zu %i", NSLOG(layout, DEBUG,
"'%.*s' %i %"PRIsizet" %i",
(int)split_box->length, split_box->text, (int)split_box->length, split_box->text,
x1 - x0, split, w); x1 - x0, split, w);

View File

@ -2696,9 +2696,10 @@ static void llcache_persist(void *p)
total_elapsed += elapsed; total_elapsed += elapsed;
total_bandwidth = (total_written * 1000) / total_elapsed; total_bandwidth = (total_written * 1000) / total_elapsed;
NSLOG(llcache, DEBUG, "Wrote %zd bytes in %lums bw:%lu %s", NSLOG(llcache, DEBUG,
written, elapsed, (written * 1000) / elapsed, "Wrote %"PRIssizet" bytes in %lums bw:%lu %s",
nsurl_access(lst[idx]->url) ); written, elapsed, (written * 1000) / elapsed,
nsurl_access(lst[idx]->url) );
/* check to for the time quantum or the size /* check to for the time quantum or the size
* (bandwidth) for this run being exceeded. * (bandwidth) for this run being exceeded.
@ -2763,8 +2764,9 @@ static void llcache_persist(void *p)
llcache->total_written += total_written; llcache->total_written += total_written;
llcache->total_elapsed += total_elapsed; llcache->total_elapsed += total_elapsed;
NSLOG(llcache, DEBUG, "writeout size:%zd time:%lu bandwidth:%lubytes/s", NSLOG(llcache, DEBUG,
total_written, total_elapsed, total_bandwidth); "writeout size:%"PRIssizet" time:%lu bandwidth:%lubytes/s",
total_written, total_elapsed, total_bandwidth);
NSLOG(llcache, DEBUG, "Rescheduling writeout in %dms", next); NSLOG(llcache, DEBUG, "Rescheduling writeout in %dms", next);
guit->misc->schedule(next, llcache_persist, NULL); guit->misc->schedule(next, llcache_persist, NULL);
@ -3431,9 +3433,9 @@ void llcache_clean(bool purge)
llcache_size -= object->source_len; llcache_size -= object->source_len;
NSLOG(llcache, DEBUG, "Freeing source data for %p len:%zd", NSLOG(llcache, DEBUG,
object, "Freeing source data for %p len:%"PRIssizet,
object->source_len); object, object->source_len);
} }
} }
@ -3452,7 +3454,7 @@ void llcache_clean(bool purge)
(object->store_state == LLCACHE_STATE_DISC) && (object->store_state == LLCACHE_STATE_DISC) &&
(object->source_data == NULL)) { (object->source_data == NULL)) {
NSLOG(llcache, DEBUG, NSLOG(llcache, DEBUG,
"discarding backed object len:%zd age:%ld (%p) %s", "discarding backed object len:%"PRIssizet" age:%ld (%p) %s",
object->source_len, object->source_len,
(long)(time(NULL) - object->last_used), (long)(time(NULL) - object->last_used),
object, object,
@ -3483,7 +3485,7 @@ void llcache_clean(bool purge)
(object->fetch.outstanding_query == false) && (object->fetch.outstanding_query == false) &&
(object->store_state == LLCACHE_STATE_RAM)) { (object->store_state == LLCACHE_STATE_RAM)) {
NSLOG(llcache, DEBUG, NSLOG(llcache, DEBUG,
"discarding fresh object len:%zd age:%ld (%p) %s", "discarding fresh object len:%"PRIssizet" age:%ld (%p) %s",
object->source_len, object->source_len,
(long)(time(NULL) - object->last_used), (long)(time(NULL) - object->last_used),
object, object,

View File

@ -37,6 +37,8 @@
#include <string.h> #include <string.h>
#include <strings.h> #include <strings.h>
#include "netsurf/inttypes.h"
#include "utils/ascii.h" #include "utils/ascii.h"
#include "utils/corestrings.h" #include "utils/corestrings.h"
#include "utils/errors.h" #include "utils/errors.h"
@ -460,19 +462,29 @@ static void nsurl__get_string_markers(const char * const url_s,
marker.fragment = marker.end; marker.fragment = marker.end;
} }
NSLOG(netsurf, DEEPDEBUG, "marker.start: %zu", marker.start); NSLOG(netsurf, DEEPDEBUG,
NSLOG(netsurf, DEEPDEBUG, "marker.scheme_end: %zu", marker.scheme_end); "marker.start: %"PRIsizet, marker.start);
NSLOG(netsurf, DEEPDEBUG, "marker.authority: %zu", marker.authority); NSLOG(netsurf, DEEPDEBUG,
"marker.scheme_end: %"PRIsizet, marker.scheme_end);
NSLOG(netsurf, DEEPDEBUG,
"marker.authority: %"PRIsizet, marker.authority);
NSLOG(netsurf, DEEPDEBUG, "marker.colon_first: %zu", marker.colon_first); NSLOG(netsurf, DEEPDEBUG,
NSLOG(netsurf, DEEPDEBUG, "marker.at: %zu", marker.at); "marker.colon_first: %"PRIsizet, marker.colon_first);
NSLOG(netsurf, DEEPDEBUG, "marker.colon_last: %zu", marker.colon_last); NSLOG(netsurf, DEEPDEBUG,
"marker.at: %"PRIsizet, marker.at);
NSLOG(netsurf, DEEPDEBUG,
"marker.colon_last: %"PRIsizet, marker.colon_last);
NSLOG(netsurf, DEEPDEBUG, "marker.path: %zu", marker.path); NSLOG(netsurf, DEEPDEBUG,
NSLOG(netsurf, DEEPDEBUG, "marker.query: %zu", marker.query); "marker.path: %"PRIsizet, marker.path);
NSLOG(netsurf, DEEPDEBUG, "marker.fragment: %zu", marker.fragment); NSLOG(netsurf, DEEPDEBUG,
"marker.query: %"PRIsizet, marker.query);
NSLOG(netsurf, DEEPDEBUG,
"marker.fragment: %"PRIsizet, marker.fragment);
NSLOG(netsurf, DEEPDEBUG, "marker.end: %zu", marker.end); NSLOG(netsurf, DEEPDEBUG,
"marker.end: %"PRIsizet, marker.end);
/* Got all the URL components pegged out now */ /* Got all the URL components pegged out now */
*markers = marker; *markers = marker;