Function should return a default value to avoid "control reaches end of non-void function [-Wreturn-type]" warning