Skip to content
  • Khaled Hosny's avatar
    Fix -Wlogical-not-parentheses · 59c195dc
    Khaled Hosny authored
    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,
                ^
                (
    59c195dc