diff options
author | Khaled Hosny <khaled@aliftype.com> | 2023-02-03 18:04:01 +0200 |
---|---|---|
committer | Khaled Hosny <khaled@aliftype.com> | 2023-02-06 11:39:08 +0200 |
commit | 59c195dc8211b9ec1ef3947d502131c74db2831d (patch) | |
tree | 02e22063b0650ea7f8893fce87629293ef4092c7 /test | |
parent | c6a27dc28b2fac589322eb18d448e1eca335d8c6 (diff) | |
download | cairo-59c195dc8211b9ec1ef3947d502131c74db2831d.tar.gz |
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,
^
(
Diffstat (limited to 'test')
-rw-r--r-- | test/pattern-getters.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/pattern-getters.c b/test/pattern-getters.c index e0ece398f..49027e913 100644 --- a/test/pattern-getters.c +++ b/test/pattern-getters.c @@ -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; |