samba-o3 test failed in ubuntu:16.04 docker container:
==> /home/samba/samba/samba-o3.stderr <==
../../source4/torture/raw/eas.c: In function ‘test_max_eas’:
../../source4/torture/raw/eas.c:286:12: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
static bool test_max_eas(struct smbcli_state *cli, struct torture_context *tctx)
^
cc1: all warnings being treated as errors
`total += j` may overflow. Change total type to `size_t` to mute error.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
bool ret = true;
bool err = false;
- int i, j, k, last, total;
+ int i, j, k, last;
+ size_t total;
DATA_BLOB eablob;
char *eaname = NULL;
int maxeasize;
last = j;
}
- torture_comment(tctx, "Total EA size:%d\n", total);
+ torture_comment(tctx, "Total EA size:%zu\n", total);
if (i == maxeanames) {
torture_comment(tctx, "NOTE: More EAs could be available!\n");
}