Skip to content

Commit d203123

Browse files
arter97wez
authored andcommitted
Fix parentheses warning
Clang 12 produces the following warning: src/main.cpp:3801:17: warning: operator '?:' has lower precedence than '*'; '*' will be evaluated first [-Wparentheses] ? (keyword_strlen * 4) ^ src/main.cpp:3801:17: note: place parentheses around the '*' expression to silence this warning ? (keyword_strlen * 4) ^ src/main.cpp:3801:17: note: place parentheses around the '?:' expression to evaluate it first ? (keyword_strlen * 4) Signed-off-by: Juhyung Park <[email protected]>
1 parent 90ad66d commit d203123

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3797,9 +3797,9 @@ int real_main(int argc, char *argv[]) {
37973797

37983798
formed_keyword_struct = (char *)calloc(
37993799
1,
3800-
sizeof(char) * set_UTF16_text
3800+
sizeof(char) * (set_UTF16_text
38013801
? (keyword_strlen * 4)
3802-
: (keyword_strlen * 2)); // *4 should carry utf16's BOM & TERM
3802+
: (keyword_strlen * 2))); // *4 should carry utf16's BOM & TERM
38033803
uint32_t keyword_struct_bytes =
38043804
APar_3GP_Keyword_atom_Format(keywords_globbed,
38053805
keyword_count,

0 commit comments

Comments
 (0)