Now
MAIN commitmail json YAML
src/tests/usr.bin/xlint/lint1/msg_324.c@1.4
/
diff
/
nxr@1.4
src/tests/usr.bin/xlint/lint1/msg_324.exp@1.3 / diff / nxr@1.3
src/tests/usr.bin/xlint/lint1/msg_324.exp@1.3 / diff / nxr@1.3
lint: fix test for message 324 on i386
i386 is an ILP32 platform (arch/i386/targparam.h). On these platforms,
int and long have the same size, and even with the -p option for
portability checks, INT_RSIZE in inittyp.c is defined to 4, not 3.
Because of this, in check_integer_conversion, psize(nt) was not greater
than psize(ot), and the warning was not issued.
To make the test behave the same on all platforms, changed the long
variables to long long, since long long is 64-bit on all platforms, and
int is 32-bit.
i386 is an ILP32 platform (arch/i386/targparam.h). On these platforms,
int and long have the same size, and even with the -p option for
portability checks, INT_RSIZE in inittyp.c is defined to 4, not 3.
Because of this, in check_integer_conversion, psize(nt) was not greater
than psize(ot), and the warning was not issued.
To make the test behave the same on all platforms, changed the long
variables to long long, since long long is 64-bit on all platforms, and
int is 32-bit.