aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2020-09-09 20:33:11 +0100
committerTomasz Kramkowski <tk@the-tk.com>2020-09-09 20:33:11 +0100
commit02fd4f3b776a3b26d4f1242df83a892576c09bee (patch)
tree8d8c1b711e150c7bab2617258783abec28d2fb94
parentaa28590647251cfd8f4f2b805a56c1b741aca565 (diff)
downloadpack-02fd4f3b776a3b26d4f1242df83a892576c09bee.tar.gz
pack-02fd4f3b776a3b26d4f1242df83a892576c09bee.tar.xz
pack-02fd4f3b776a3b26d4f1242df83a892576c09bee.zip
Fix type complaints
-rw-r--r--test_gen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test_gen.c b/test_gen.c
index d7c4cef..4e4f057 100644
--- a/test_gen.c
+++ b/test_gen.c
@@ -45,7 +45,7 @@ static const char *u2bytes(enum endian e, int n, uintmax_t v)
for (int i = 0; i < n; i++) {
p += snprintf(p, b + sizeof(b) - p, "%s0x%x", i == 0 ? "" : ", ",
- (v >> (e == LITTLE ? i : n - i - 1) * 8) & 0xff);
+ (int)((v >> (e == LITTLE ? i : n - i - 1) * 8) & 0xff));
assert(p < b + sizeof(b));
}
@@ -65,7 +65,7 @@ static const char *i2bytes(enum endian e, int n, intmax_t v)
return u2bytes(e, n, i2u(n, v));
}
-static void generate_simple(FILE *out, char fmt, const char *type, intmax_t min, uintmax_t max, int size)
+static void generate_simple(FILE *out, char fmt, const char *type, intmax_t min, uintmax_t max, size_t size)
{
unsigned char data[8];
char *prefix;