Bug 182389

Summary: -Wreturn-type warning in DFGObjectAllocationSinkingPhase.cpp
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: JavaScriptCoreAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, keith_miller, mark.lam, mcatanzaro, msaboff, saam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Michael Catanzaro
Reported 2018-02-01 08:05:15 PST
-Wreturn-type warning in DFGObjectAllocationSinkingPhase.cpp: [1296/3695] Building CXX object Source.../unified-sources/UnifiedSource48.cpp.o In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource48.cpp:2:0: ../../Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp: In member function ‘JSC::DFG::Node* JSC::DFG::{anonymous}::ObjectAllocationSinkingPhase::createRecovery(JSC::DFG::BasicBlock*, JSC::DFG::PromotedHeapLocation, JSC::DFG::Node*, bool&)’: ../../Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:2336:5: warning: control reaches end of non-void function [-Wreturn-type] } ^
Attachments
Patch (2.46 KB, patch)
2018-02-01 08:07 PST, Michael Catanzaro
no flags
Michael Catanzaro
Comment 1 2018-02-01 08:07:35 PST
Michael Catanzaro
Comment 2 2018-02-01 08:10:25 PST
Comment on attachment 332878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=332878&action=review > Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:-1535 > - break; I dunno why these breaks were here, but they're right after return statements, so they can never be reached. It's unrelated to the warning; I can leave them if this is considered desirable code style. > Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:2329 > DFG_CRASH(m_graph, base, "Bad location kind"); > break; Could get rid of this break, too. > Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:2332 > + RELEASE_ASSERT_NOT_REACHED(); This is what's actually needed to silence the warning.
Michael Catanzaro
Comment 3 2018-02-01 08:11:28 PST
(In reply to Michael Catanzaro from comment #2) > This is what's actually needed to silence the warning. Alternative would be to move the DFG_CRASH() down out of the switch case, but I figure it's a bit more clear this way.
Yusuke Suzuki
Comment 4 2018-02-01 08:46:41 PST
Comment on attachment 332878 [details] Patch r=me
WebKit Commit Bot
Comment 5 2018-02-01 09:27:10 PST
Comment on attachment 332878 [details] Patch Clearing flags on attachment: 332878 Committed r227970: <https://trac.webkit.org/changeset/227970>
WebKit Commit Bot
Comment 6 2018-02-01 09:27:11 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2018-02-01 09:29:06 PST
Note You need to log in before you can comment on or make changes to this bug.