Commit 8115f1e7 by Ben Clayton

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: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 1934b10f
...@@ -183,8 +183,10 @@ bool ValidateTexParamParameters(GLenum pname, GLint param) ...@@ -183,8 +183,10 @@ bool ValidateTexParamParameters(GLenum pname, GLint param)
return true; return true;
default: default:
return error(GL_INVALID_ENUM, false); break;
} }
return error(GL_INVALID_ENUM, false);
} }
static bool ValidateSamplerObjectParameter(GLenum pname) static bool ValidateSamplerObjectParameter(GLenum pname)
......
...@@ -277,9 +277,11 @@ sw::FilterType SpirvShader::convertFilterMode(const vk::Sampler *sampler) ...@@ -277,9 +277,11 @@ sw::FilterType SpirvShader::convertFilterMode(const vk::Sampler *sampler)
} }
break; break;
default: default:
UNIMPLEMENTED("magFilter %d", sampler->magFilter); break;
return FILTER_POINT;
} }
UNIMPLEMENTED("magFilter %d", sampler->magFilter);
return FILTER_POINT;
} }
sw::MipmapType SpirvShader::convertMipmapMode(const vk::Sampler *sampler) sw::MipmapType SpirvShader::convertMipmapMode(const vk::Sampler *sampler)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment