bpo-29939: suppress compiler warnings in _ctypes_test (#1038)

bpo-29939: Changed test code to suppress a compiler warning, while taking care to avoid the code being optimized out by the compiler.
(cherry picked from commit 164d30eb1e)
This commit is contained in:
Vinay Sajip 2017-04-07 23:23:08 +01:00 committed by GitHub
parent 616d3eb7ef
commit d0d575a6db

View file

@ -52,9 +52,9 @@ _testfunc_cbk_large_struct(Test in, void (*func)(Test))
EXPORT(void) EXPORT(void)
_testfunc_large_struct_update_value(Test in) _testfunc_large_struct_update_value(Test in)
{ {
in.first = 0x0badf00d; ((volatile Test *)&in)->first = 0x0badf00d;
in.second = 0x0badf00d; ((volatile Test *)&in)->second = 0x0badf00d;
in.third = 0x0badf00d; ((volatile Test *)&in)->third = 0x0badf00d;
} }
EXPORT(void)testfunc_array(int values[4]) EXPORT(void)testfunc_array(int values[4])