From 59c195dc8211b9ec1ef3947d502131c74db2831d Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 3 Feb 2023 18:04:01 +0200 Subject: 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, ^ ( --- test/pattern-getters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') 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; -- cgit v1.2.1