]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: sample: fix format warning on 32-bit archs in sample_conv_be2dec_check()
authorWilly Tarreau <w@1wt.eu>
Wed, 15 Sep 2021 08:30:40 +0000 (10:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Sep 2021 08:32:12 +0000 (10:32 +0200)
The sizeof() was printed as a long but it's just an unsigned on some
32-bit platforms, hence the format warning. No backport is needed, as
this arrived in 2.5 with commit  40ca09c7b ("MINOR: sample: Add be2dec
converter").

src/sample.c

index 3126be1056906f5559cb66651bab50dda4be9d8c..ab37a9674b15663630016f06430c4ac4a9d33bc4 100644 (file)
@@ -2070,7 +2070,7 @@ static int sample_conv_be2dec_check(struct arg *args, struct sample_conv *conv,
                                     const char *file, int line, char **err)
 {
        if (args[1].data.sint <= 0 || args[1].data.sint > sizeof(unsigned long long)) {
-               memprintf(err, "chunk_size out of [1..%ld] range (%lld)", sizeof(unsigned long long), args[1].data.sint);
+               memprintf(err, "chunk_size out of [1..%u] range (%lld)", (uint)sizeof(unsigned long long), args[1].data.sint);
                return 0;
        }