Commit 6046db1
committed
fix: parentheses warnings
Fixes:
```
compiling ../../../../ext/ios_parser/c_lexer/lexer.c
../../../../ext/ios_parser/c_lexer/lexer.c: In function 'process_word':
../../../../ext/ios_parser/c_lexer/lexer.c:41:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
41 | #define IS_DIGIT(C) '0' <= C && C <= '9'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:43:25: note: in expansion of macro 'IS_DIGIT'
43 | #define IS_DECIMAL(C) IS_DIGIT(C) || IS_DOT(C)
| ^~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:25: note: in expansion of macro 'IS_DECIMAL'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:306:9: note: in expansion of macro 'IS_WORD'
306 | if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:44:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
44 | #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:42: note: in expansion of macro 'IS_LETTER'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:306:9: note: in expansion of macro 'IS_WORD'
306 | if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:44:58: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
44 | #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:42: note: in expansion of macro 'IS_LETTER'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:306:9: note: in expansion of macro 'IS_WORD'
306 | if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c: In function 'process_decimal':
../../../../ext/ios_parser/c_lexer/lexer.c:41:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
41 | #define IS_DIGIT(C) '0' <= C && C <= '9'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:43:25: note: in expansion of macro 'IS_DIGIT'
43 | #define IS_DECIMAL(C) IS_DIGIT(C) || IS_DOT(C)
| ^~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:25: note: in expansion of macro 'IS_DECIMAL'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:320:16: note: in expansion of macro 'IS_WORD'
320 | } else if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:44:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
44 | #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:42: note: in expansion of macro 'IS_LETTER'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:320:16: note: in expansion of macro 'IS_WORD'
320 | } else if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:44:58: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
44 | #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:42: note: in expansion of macro 'IS_LETTER'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:320:16: note: in expansion of macro 'IS_WORD'
320 | } else if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c: In function 'process_integer':
../../../../ext/ios_parser/c_lexer/lexer.c:41:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
41 | #define IS_DIGIT(C) '0' <= C && C <= '9'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:43:25: note: in expansion of macro 'IS_DIGIT'
43 | #define IS_DECIMAL(C) IS_DIGIT(C) || IS_DOT(C)
| ^~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:25: note: in expansion of macro 'IS_DECIMAL'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:342:16: note: in expansion of macro 'IS_WORD'
342 | } else if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:44:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
44 | #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:42: note: in expansion of macro 'IS_LETTER'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:342:16: note: in expansion of macro 'IS_WORD'
342 | } else if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:44:58: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
44 | #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:42: note: in expansion of macro 'IS_LETTER'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:342:16: note: in expansion of macro 'IS_WORD'
342 | } else if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c: In function 'is_banner_end_char':
../../../../ext/ios_parser/c_lexer/lexer.c:408:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
408 | (0 < lex->pos && '\n' == lex->text[lex->pos - 1] ||
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c: In function 'process_root':
../../../../ext/ios_parser/c_lexer/lexer.c:41:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
41 | #define IS_DIGIT(C) '0' <= C && C <= '9'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:43:25: note: in expansion of macro 'IS_DIGIT'
43 | #define IS_DECIMAL(C) IS_DIGIT(C) || IS_DOT(C)
| ^~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:25: note: in expansion of macro 'IS_DECIMAL'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:519:16: note: in expansion of macro 'IS_WORD'
519 | } else if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:44:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
44 | #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:42: note: in expansion of macro 'IS_LETTER'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:519:16: note: in expansion of macro 'IS_WORD'
519 | } else if (IS_WORD(c)) {
| ^~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:44:58: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
44 | #define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z'
| ~~~~~~~~~^~~~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:46:42: note: in expansion of macro 'IS_LETTER'
46 | #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C)
| ^~~~~~~~~
../../../../ext/ios_parser/c_lexer/lexer.c:519:16: note: in expansion of macro 'IS_WORD'
519 | } else if (IS_WORD(c)) {
| ^~~~~~~
```1 parent a8f0a5b commit 6046db1
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| |||
0 commit comments