samba-o3: fix -Werror=strict-overflow error in s4/torture/raw/eas module
authorJoe Guo <joeg@catalyst.net.nz>
Wed, 19 Dec 2018 01:37:33 +0000 (14:37 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 8 Mar 2019 00:42:19 +0000 (00:42 +0000)
commit16d40ffcf04a0c3c7dd8699cf7980ed1fb32612a
tree0f051a1cfeb5a068f9efc8f9b92fe5267871629b
parent3ddb5429a0b67f4867ef2730d0817d432486b15c
samba-o3: fix -Werror=strict-overflow error in s4/torture/raw/eas module

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>
source4/torture/raw/eas.c