diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2020-09-09 20:33:11 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2020-09-09 20:33:11 +0100 |
commit | 02fd4f3b776a3b26d4f1242df83a892576c09bee (patch) | |
tree | 8d8c1b711e150c7bab2617258783abec28d2fb94 | |
parent | aa28590647251cfd8f4f2b805a56c1b741aca565 (diff) | |
download | pack-02fd4f3b776a3b26d4f1242df83a892576c09bee.tar.gz pack-02fd4f3b776a3b26d4f1242df83a892576c09bee.tar.xz pack-02fd4f3b776a3b26d4f1242df83a892576c09bee.zip |
Fix type complaints
-rw-r--r-- | test_gen.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |