RESOLVED FIXED 21973
gcc warnings in ASCIICType.h and Font.h
https://bugs.webkit.org/show_bug.cgi?id=21973
Summary gcc warnings in ASCIICType.h and Font.h
Benjamin K. Stuhl
Reported 2008-10-30 10:02:59 PDT
gcc 4.3.3 generates "suggest parentheses around && within ||" warnings when compiling JavaScriptCore/wtf/ASCIICType.h and WebCore/platform/graphics/Font.h The code looks to be correct, just easy enough to mentally mis-parse that gcc warns about it with "build-webkit --qt"'s default compiler flags.
Attachments
patch: add parentheses to disambiguate things (5.13 KB, patch)
2008-10-30 10:08 PDT, Benjamin K. Stuhl
mitz: review+
Benjamin K. Stuhl
Comment 1 2008-10-30 10:08:03 PDT
Created attachment 24773 [details] patch: add parentheses to disambiguate things
Benjamin K. Stuhl
Comment 2 2008-10-30 10:09:34 PDT
Here's a patch to add disambiguating parentheses and quiet the warnings. It's my first patch to WebKit, so let me know what else I need to do.
mitz
Comment 3 2008-10-30 11:07:11 PDT
Comment on attachment 24773 [details] patch: add parentheses to disambiguate things r=me for these changes. I am not sure that as a rule this should be done everywhere where some compiler might suggest it.
Benjamin K. Stuhl
Comment 4 2008-10-30 13:11:06 PDT
Agreed, there may be places where just adding parentheses is not a great idea -- but getting a page of warnings from every file that includes ASCIICType.h isn't great either. Will you be landing the patch, then?
Timothy Hatcher
Comment 5 2008-10-30 22:36:44 PDT
Landed in r38024.
Note You need to log in before you can comment on or make changes to this bug.