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

View File

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

View File

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