switch c: control may reach end of non-void function [-Wreturn-type]