This is an archive of the discontinued LLVM Phabricator instance.

[debugserver] Fix "control may reach end of non-void function" warnings.
ClosedPublic

Authored by brucem on Aug 3 2015, 8:34 PM.

Diff Detail

Event Timeline

brucem updated this revision to Diff 31293.Aug 3 2015, 8:34 PM
brucem retitled this revision from to [debugserver] Fix "control may reach end of non-void function" warnings..
brucem updated this object.
brucem added reviewers: clayborg, jingham.
brucem added a subscriber: lldb-commits.
jasonmolenda accepted this revision.Aug 3 2015, 8:37 PM
jasonmolenda added a reviewer: jasonmolenda.
jasonmolenda added a subscriber: jasonmolenda.

Hm, won't we get some compiler warning about how there aren't default: cases for these switch statements? :) This change is fine if it helps eliminate unhelpful warnings.

This revision is now accepted and ready to land.Aug 3 2015, 8:37 PM
brucem added a comment.Aug 3 2015, 8:52 PM

It doesn't create new warnings in the cmake build (which appears to have a lot more warnings enabled than the xcode build). I'm trying to slowly work towards zero warnings in the OS X cmake build.

This shouldn't generate new warnings though since it is checking for numerical values rather than something like an enumeration where it can make sure the range of the value is covered by the switch statement's cases. (Which is another set of warnings to address...)

Good point. Thanks for doing this.

This revision was automatically updated to reflect the committed changes.