| Summary: | [cmake] Suppress parentheses-equality warnings | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> | ||||||||
| Component: | New Bugs | Assignee: | Csaba Osztrogonác <ossy> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | ossy | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 145121 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Csaba Osztrogonác
2015-05-18 03:38:11 PDT
Created attachment 253322 [details]
Patch
Removed extra parentheses to make clang happy ... the result is ugly, but it works ... Better fix is very welcome.
and one more in TestNetscapePlugIn/main.cpp: ../../Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:420:52: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] ../../Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:420:52: note: remove extraneous parentheses around the comparison to silence this warning Created attachment 253323 [details]
Patch
Comment on attachment 253323 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253323&action=review > Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:450 > + if NPVARIANT_IS_STRING(variant) This looks worse than before. Can this warning be disabled instead? Did it catch any bugs ever? (In reply to comment #4) > Comment on attachment 253323 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=253323&action=review > > > Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:450 > > + if NPVARIANT_IS_STRING(variant) > > This looks worse than before. Can this warning be disabled instead? Did it > catch any bugs ever? Yes, I told it is ugly. But I don't want to disable this useful warning, because it is responsible for the opposite and typical programming error: if (a=b). We do want to get warning for this serious bug. Any better idea how to supress this warning only here without disabling it in general? Comment on attachment 253323 [details]
Patch
I was wrong, fortunately Wparentheses-equality and Wparantheses
are diffent warnings. Let's suppress only Wparentheses-equality.
Created attachment 253524 [details]
Patch
It works in itself for the most part of WebKit, but will have no effect in TestNetscapePlugIn until bug145264 is fixed. Comment on attachment 253524 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253524&action=review > Source/cmake/WebKitHelpers.cmake:18 > + # Suppress -Wparentheses-equality warning of Clang Why? Comment on attachment 253524 [details]
Patch
Oh, I see why.
Comment on attachment 253524 [details] Patch Clearing flags on attachment: 253524 Committed r185055: <http://trac.webkit.org/changeset/185055> All reviewed patches have been landed. Closing bug. |