summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-01-06 20:44:34 (GMT)
committer John-Mark Bell <jmb@netsurf-browser.org>2014-01-13 01:00:09 (GMT)
commitde948c17e6d2f2f8fd0f11ec64747521f7daf389 (patch)
treee1e99e47bc08a805eab0fb35be9d818735c5c41b /test
parent7d818fad7c441dbb793a9585243e580f6bbc61ca (diff)
downloadlibcss-de948c17e6d2f2f8fd0f11ec64747521f7daf389.tar.gz
libcss-de948c17e6d2f2f8fd0f11ec64747521f7daf389.tar.bz2
print size_t values in a portable way
Signed-off-by: John-Mark Bell <jmb@netsurf-browser.org>
Diffstat (limited to 'test')
-rw-r--r--test/parse-auto.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/parse-auto.c b/test/parse-auto.c
index 2bbe61e..a332a5b 100644
--- a/test/parse-auto.c
+++ b/test/parse-auto.c
@@ -340,12 +340,14 @@ static void report_fail(const uint8_t *data, size_t datalen, exp_entry *e)
printf(" Expected entry:\n");
printf(" entry type:%d name:%s\n", e->type, e->name);
- printf(" bytecode len:%ld used:%ld\n", e->bclen, e->bcused);
+ printf(" bytecode len:%" PRIuMAX " used:%" PRIuMAX "\n",
+ (uintmax_t) e->bclen, (uintmax_t) e->bcused);
printf(" bytecode ");
for (bcoff = 0; bcoff < e->bcused; bcoff++) {
printf("%.2x ", ((uint8_t *) e->bytecode)[bcoff]);
}
- printf("\n string table len:%ld used %ld\n", e->stlen, e->stused);
+ printf("\n string table len:%" PRIuMAX " used %" PRIuMAX "\n",
+ (uintmax_t) e->stlen, (uintmax_t) e->stused);
/*
struct stentry {
size_t off;
@@ -513,9 +515,9 @@ bool validate_rule_selector(css_rule_selector *s, exp_entry *e)
if ((s->style->used * sizeof(css_code_t)) != e->bcused) {
printf("FAIL Bytecode lengths differ\n"
- " Got length %ld, Expected %u\n",
- (s->style->used * sizeof(css_code_t)),
- (int) e->bcused);
+ " Got length %" PRIuMAX ", Expected %" PRIuMAX "\n",
+ (uintmax_t) (s->style->used * sizeof(css_code_t)),
+ (uintmax_t) e->bcused);
return true;
}