summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-11 16:29:57 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2017-09-11 16:29:57 (GMT)
commitb9bdc8d3125bf656d865c1015b1fbb7b1be15f8d (patch)
tree2e2fd65ed468986c32de888ddd59e5bbb41e1ece
parent8afeffedad0d7c3e63929f2e6a78f2e71aa1f773 (diff)
downloadnetsurf-b9bdc8d3125bf656d865c1015b1fbb7b1be15f8d.tar.gz
netsurf-b9bdc8d3125bf656d865c1015b1fbb7b1be15f8d.tar.bz2
fix image cache format specifiers signedness
-rw-r--r--content/handlers/image/image_cache.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/content/handlers/image/image_cache.c b/content/handlers/image/image_cache.c
index 7fba11f..a1de01d 100644
--- a/content/handlers/image/image_cache.c
+++ b/content/handlers/image/image_cache.c
@@ -636,7 +636,7 @@ case chr : \
FMTCHR('b', PRIssizet, params.hysteresis);
FMTCHR('c', PRIssizet, total_bitmap_size);
FMTCHR('d', "d", bitmap_count);
- FMTCHR('e', "d", current_age / 1000);
+ FMTCHR('e', "u", current_age / 1000);
FMTCHR('f', PRIssizet, max_bitmap_size);
FMTCHR('g', "d", max_bitmap_size_count);
FMTCHR('h', "d", max_bitmap_count);
@@ -645,7 +645,7 @@ case chr : \
case 'j':
slen += snprintf(string + slen, size - slen,
- "%d", pct?100:op_count);
+ "%u", pct?100:op_count);
break;
FMTPCHR('k', "d", hit_count, op_count);
@@ -665,7 +665,7 @@ case chr : \
FMTCHR('t', "d", specultive_miss_count);
FMTCHR('u', "d", total_extra_conversions);
FMTCHR('v', "d", total_extra_conversions_count);
- FMTCHR('w', "d", peak_conversions_size);
+ FMTCHR('w', "u", peak_conversions_size);
FMTCHR('x', "d", peak_conversions);
@@ -688,8 +688,11 @@ case chr : \
}
/* exported interface documented in image_cache.h */
-int image_cache_snentryf(char *string, size_t size, unsigned int entryn,
- const char *fmt)
+int
+image_cache_snentryf(char *string,
+ size_t size,
+ unsigned int entryn,
+ const char *fmt)
{
struct image_cache_entry_s *centry;
size_t slen = 0; /* current output string length */
@@ -706,7 +709,7 @@ int image_cache_snentryf(char *string, size_t size, unsigned int entryn,
switch (fmt[fmtc]) {
case 'e':
slen += snprintf(string + slen, size - slen,
- "%d", entryn);
+ "%u", entryn);
break;
case 'r':