prevent a precedence warning on clang
authorTony Cook <tony@develop-help.com>
Fri, 2 Aug 2013 01:27:10 +0000 (11:27 +1000)
committerTony Cook <tony@develop-help.com>
Fri, 2 Aug 2013 01:27:10 +0000 (11:27 +1000)
Dumper.xs:245:29: warning: '&&' within '||' [-Wlogical-op-parentheses]
                   ((k >= 7 && k <= 10 || k == 12 || k == 13 || k == 27)
                     ~~~~~~~^~~~~~~~~~ ~~
Dumper.xs:245:29: note: place parentheses around the '&&' expression to silence
      this warning
                   ((k >= 7 && k <= 10 || k == 12 || k == 13 || k == 27)

dist/Data-Dumper/Dumper.xs

index 20ed7cf..3fdc71f 100644 (file)
@@ -242,7 +242,7 @@ esc_q_utf8(pTHX_ SV* sv, const char *src, STRLEN slen, I32 do_utf8, I32 useqq)
 #ifndef EBCDIC
        } else if (useqq &&
            /* we can't use the short form like '\0' if followed by a digit */
-                   ((k >= 7 && k <= 10 || k == 12 || k == 13 || k == 27)
+                   (((k >= 7 && k <= 10) || k == 12 || k == 13 || k == 27)
                  || (k < 8 && (next < '0' || next > '9')))) {
            grow += 2;
        } else if (useqq && k <= 31 && (next < '0' || next > '9')) {