Bug 215699 - [GTK][WPE] Compilation warnings with clang/gcc 10
Summary: [GTK][WPE] Compilation warnings with clang/gcc 10
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-20 09:16 PDT by Philippe Normand
Modified: 2020-08-22 07:35 PDT (History)
13 users (show)

See Also:


Attachments
Patch (13.67 KB, patch)
2020-08-20 09:25 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (13.89 KB, patch)
2020-08-20 10:27 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (12.50 KB, patch)
2020-08-20 10:29 PDT, Philippe Normand
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2020-08-20 09:16:57 PDT
I'll send a patch. About misleading-indentation, the warnings are:

../../Source/JavaScriptCore/b3/B3Validate.cpp:112:105: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]                                                      
                    do { if (dominators.dominates(valueOwner.get(child), valueOwner.get(value))) break; fail("../../Source/JavaScriptCore/b3/B3Validate.cpp", 112, __PRETTY_FUNCTION__, "dominators.dominates(value
Owner.get(child), valueOwner.get(value))", toCString ("at ", *value, "->", pointerDump(child))); } while (false);                                                                                                  
                                                                                                        ^                                                                                                          
../../Source/JavaScriptCore/b3/B3Validate.cpp:111:17: note: previous statement is here                                                                                                                             
                else                                                                                                                                                                                               
                ^                                                                                                                                                                                                  
../../Source/JavaScriptCore/b3/B3Validate.cpp:618:68: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]                                                       
                    do { if (value.value()->type().isInt()) break; fail("../../Source/JavaScriptCore/b3/B3Validate.cpp", 618, __PRETTY_FUNCTION__, "value.value()->type().isInt()", toCString ("At ", *context, ": 
", value)); } while (false);                                                                                                                                                                                       
                                                                   ^                                                                                                                                               
../../Source/JavaScriptCore/b3/B3Validate.cpp:617:17: note: previous statement is here                                                                                                                             
                else                                                                                                                                                                                               
                ^                                                                                                                                                                                                  
../../Source/JavaScriptCore/b3/B3Validate.cpp:623:70: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]                                                                           do { if (value.value()->type().isFloat()) break; fail("../../Source/JavaScriptCore/b3/B3Validate.cpp", 623, __PRETTY_FUNCTION__, "value.value()->type().isFloat()", toCString ("At ", *context, ": ", value)); } while (false);                                                                                                                                                                                                                                                        ^                                                                                                                                             ../../Source/JavaScriptCore/b3/B3Validate.cpp:622:17: note: previous statement is here                                                                                                                                             else                                                                                                                                                                                                               ^                                                                                                                                                                                                  3 warnings generated.                                                                                                                                                                                              [1395/3591] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-16.cpp.o                                            In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-23a5fd0e-16.cpp:2:                                                                                                               
../../Source/JavaScriptCore/b3/air/AirValidate.cpp:90:57: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]                                                                       do { if (!inst.isTerminal()) break; fail("../../Source/JavaScriptCore/b3/air/AirValidate.cpp", 90, __PRETTY_FUNCTION__, "!inst.isTerminal()", toCString ("At ", inst, " in ", *block)); } while
 (false);                                                                                                                                                                                                          
                                                        ^                                                                                                                                                          
../../Source/JavaScriptCore/b3/air/AirValidate.cpp:89:17: note: previous statement is here                                                                                                                         
                else                                                                                                                                                                                               
                ^                                                                                                                                                                                                  
1 warning generated.                                                                                                                                                                                               
[1447/3591] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-0e543b66-1.cpp.o                                             In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-0e543b66-1.cpp:3:                                                                                                                
In file included from ../../Source/JavaScriptCore/interpreter/CallFrame.cpp:36:                                                                                                                                    
../../Source/JavaScriptCore/wasm/WasmContextInlines.h:66:9: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]                                                 
        instance = inst;                                                                                                                                                                                           
        ^                                                                                                                                                                                                          
../../Source/JavaScriptCore/wasm/WasmContextInlines.h:58:5: note: previous statement is here                                                                                                                       
    if (inst)                                                                                                                                                                                                      
    ^                                                                                                                                                                                                              
1 warning generated.
[1448/3591] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-3a3c4ec0-1.cpp.o
In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-3a3c4ec0-1.cpp:1:
In file included from ../../Source/JavaScriptCore/jit/AssemblyHelpers.cpp:41:
../../Source/JavaScriptCore/wasm/WasmContextInlines.h:66:9: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
        instance = inst;
        ^
../../Source/JavaScriptCore/wasm/WasmContextInlines.h:58:5: note: previous statement is here
    if (inst)
    ^
1 warning generated.


As I'm not sure what to do about this, I propose to disable this warning, as these reports are false-positive due to macro usage, IIUC. But I'm open to proposals :)
Comment 1 Philippe Normand 2020-08-20 09:25:12 PDT
Created attachment 406936 [details]
Patch
Comment 2 Philippe Normand 2020-08-20 10:27:09 PDT
Created attachment 406942 [details]
Patch
Comment 3 Philippe Normand 2020-08-20 10:29:26 PDT
Created attachment 406943 [details]
Patch
Comment 4 Konstantin Tokarev 2020-08-20 10:36:23 PDT
Comment on attachment 406943 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=406943&action=review

> Source/WebCore/ChangeLog:15
> +        matchingRuns assignment. I have no idea how this was supposed to work?

It worked like

   bool matchingRuns = (matchingRuns = checkForMatchingNonTextRuns(...));

Assignment operator returns assigned value so matchingRuns was assigned twice
Comment 5 Philippe Normand 2020-08-22 07:35:33 PDT
Committed r266025: <https://trac.webkit.org/changeset/266025>