fix warnings found by the analyzer

Fix analyzer warnings related to missing `return`s.

@umop @jwren