19 Jun
2025
19 Jun
'25
2:01 a.m.
Across the codebase there are several test cases where the arguments to ok() is not safe to evaluate unless the test case fails. For example: ok(i == ARRAY_SIZE(array), "i is too small: %d\n", array[i]); Only when the test fails (i.e. i < ARRAY_SIZE(array)), is array[i] safe to evaluate. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58320 * * * The other option is to fix all such cases in the test suite, and add some documentation to make it clear arguments to `ok()` are _always_ evaluated. I don't know which one is better. -- v2: include: Shut the compiler up about PDNS_RECORD array bounds. https://gitlab.winehq.org/wine/wine/-/merge_requests/8360