-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] } ^
Created attachment 332878 [details] Patch
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.
(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.
Comment on attachment 332878 [details] Patch r=me
Comment on attachment 332878 [details] Patch Clearing flags on attachment: 332878 Committed r227970: <https://trac.webkit.org/changeset/227970>
All reviewed patches have been landed. Closing bug.
<rdar://problem/37118957>