Bug 140764

Summary: Fix unused parameter warnings and handle them as build error
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED WONTFIX    
Severity: Normal CC: commit-queue, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Csaba Osztrogonác 2015-01-22 07:19:07 PST
I noticed zillion patches fix newly introduced unused parameter
warnings on GTK and EFL. Now they are handled as warnings, not error.
Mac port handles unused parameters as build error, except in WebKit,
WebKit2 and WebInspectorUI. ( WebInspectorUI is warning free now, but 
there are zillion warnings in WebKit and Webkit2. )

I think we should stop this dog-cat game, introducing new 
warnings, fixing them, new warnings, fixing them ...

I propose fixing all of them now and then handle them as errors
to avoid introducing these warnings again and again.
Comment 1 Csaba Osztrogonác 2015-01-22 07:23:27 PST
Created attachment 245141 [details]
Patch

WIP patch for bots (tested on EFL and Mac locally)
Comment 2 WebKit Commit Bot 2015-01-22 07:27:28 PST
Attachment 245141 [details] did not pass style-queue:


ERROR: Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:539:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:399:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:404:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:410:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:415:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:383:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:181:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:3031:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:308:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/Shared/mac/ObjCObjectGraph.mm:54:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/Shared/mac/ObjCObjectGraph.mm:178:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 11 in 78 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Csaba Osztrogonác 2015-01-22 07:28:32 PST
note: I haven't fixed WebKit1 and don't want to do it, because it 
is used by only Apple, warnings in it don't affect GTK and EFL.
Comment 4 Csaba Osztrogonác 2015-01-26 06:27:57 PST
Created attachment 245347 [details]
Patch

updated to ToT + check iOS EWS too
Comment 5 WebKit Commit Bot 2015-01-26 06:30:04 PST
Attachment 245347 [details] did not pass style-queue:


ERROR: Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:539:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:399:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:404:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:410:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:415:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp:383:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:181:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/UIProcess/API/mac/WKView.mm:3031:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:308:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/Shared/mac/ObjCObjectGraph.mm:54:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/Shared/mac/ObjCObjectGraph.mm:178:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 11 in 78 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Csaba Osztrogonác 2015-03-05 06:07:17 PST
webkit-dev thread: https://lists.webkit.org/pipermail/webkit-dev/2015-January/027184.html

It would be too big change, close as wontfix.