build: enable -Werror=switch/return-type errors with extra checks
-Werror=return-type
seems to be enabled in openSUSE Tumbleweed which leads to the error reported here.
This will collide with !6388 (merged)
v2: without the commits from !6456 (merged)
Edited by Steve Lhomme