mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 04:40:07 +01:00
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:
parent
c6a27dc28b
commit
59c195dc82
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue