Fix -Wlogical-not-parentheses

The code is doing "if (!double_buf_equal () != 0)" which seems to be a
convoluted way to do "if (!double_buf_equal ())". Fixes:

../test/pattern-getters.c:153:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
        if (!double_buf_equal (ctx, new_buf, expected_values,
            ^
../test/pattern-getters.c:153:6: note: add parentheses after the '!' to evaluate the comparison first
        if (!double_buf_equal (ctx, new_buf, expected_values,
            ^
             (
../test/pattern-getters.c:153:6: note: add parentheses around left hand side expression to silence this warning
        if (!double_buf_equal (ctx, new_buf, expected_values,
            ^
            (
This commit is contained in:
Khaled Hosny 2023-02-03 18:04:01 +02:00
parent c6a27dc28b
commit 59c195dc82

View file

@ -151,7 +151,7 @@ draw (cairo_t *cr, int width, int height)
}
if (!double_buf_equal (ctx, new_buf, expected_values,
ARRAY_LENGTH (expected_values)) != 0)
ARRAY_LENGTH (expected_values)))
{
cairo_pattern_destroy (pat);
return CAIRO_TEST_FAILURE;