On 10/17/2014 10:18 AM, Henri Verbeet wrote:
From your description, it's not all that clear to me what's actually happening.
Well there are a bunch of if/else lines in a function.
https://github.com/wine-mirror/wine/blob/a99d3c5bffe08/programs/reg/tests/re...
You'd expect each if/else to run regardless of the previous one's branch, but if todo is TODO_REG_TYPE for instance it will never run either branch from the following 2 if statements.
It's as if it returns or as if the rest of the if statements are wrapped in the first one's else block, but I don't see anything like that happening...
Examining an else line with cpp gives a clearer picture:
(winetest_set_location("reg.c", line), 0) ? (void)0 : winetest_ok(size == exp_size, "got wrong size %d, expected %d\n", size, exp_size);
This is being evaluated as false in a ternary operator...
(winetest_set_location("reg.c", line), 0)
winetest_set_location returns void. I didn't even know this was supposed to be valid C, and even if I did I have no idea why it's doing what it's doing!