noop-renderer: Make sure buffer access doesn't get optimised out
noop-renderer needs to actually access the buffer content, to ensure that the bad-buffer test works. This was previously done using a volatile variable, but clang rightly pointed out that the variable access had no effect (since the volatile stack variable was never read from, and the source is not volatile), so 9b0b5b57 changed it to be explicitly marked it as unused to suppress the compiler warning. Unfortunately suppressing the warning still leaves the compiler free to optimise out the access. Replace the variable decorations with actually using the result of the read, so we can be really sure that it's never going to be optimised away. Signed-off-by: Daniel Stone <daniels@collabora.com>
Loading
Please register or sign in to comment