Fix 'control reaches end of non-void function' warnings treated as errors

All switch control flows return, but the compiler doesn't seem smart enough to notice this.

This magically started happening when I switched to using ninja, possibly suggesting that it is either suddenly using a different compiler or the flags are different.

While something I'll try investigating, here's a fix all the same.

Bug: b/130335507
Change-Id: I3c6d00c00ecd03bbd34d51ac62d02fefdc026526
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32649
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/src/OpenGL/libGLESv2/libGLESv3.cpp b/src/OpenGL/libGLESv2/libGLESv3.cpp
index 6ba4c9d..e513a50 100644
--- a/src/OpenGL/libGLESv2/libGLESv3.cpp
+++ b/src/OpenGL/libGLESv2/libGLESv3.cpp
@@ -183,8 +183,10 @@
 		return true;
 
 	default:
-		return error(GL_INVALID_ENUM, false);
+		break;
 	}
+
+	return error(GL_INVALID_ENUM, false);
 }
 
 static bool ValidateSamplerObjectParameter(GLenum pname)
diff --git a/src/Pipeline/SpirvShaderSampling.cpp b/src/Pipeline/SpirvShaderSampling.cpp
index c80228b..25763a9 100644
--- a/src/Pipeline/SpirvShaderSampling.cpp
+++ b/src/Pipeline/SpirvShaderSampling.cpp
@@ -277,9 +277,11 @@
 		}
 		break;
 	default:
-		UNIMPLEMENTED("magFilter %d", sampler->magFilter);
-		return FILTER_POINT;
+		break;
 	}
+
+	UNIMPLEMENTED("magFilter %d", sampler->magFilter);
+	return FILTER_POINT;
 }
 
 sw::MipmapType SpirvShader::convertMipmapMode(const vk::Sampler *sampler)