This patch fixes this Clang sometimes-uninitialized warning.
depthstencil-render-miplevels.cpp:159:2: warning: variable 'format' is used
uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
default:
^~~~~~~
depthstencil-render-miplevels.cpp:163:16: note: uninitialized use occurs here
GLenum type = format == GL_DEPTH_STENCIL
^~~~~~
depthstencil-render-miplevels.cpp:141:15: note: initialize the variable
'format' to silence this warning
GLenum format;
^
= 0
Signed-off-by: Vinson Lee <[email protected]>
---
tests/texturing/depthstencil-render-miplevels.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/texturing/depthstencil-render-miplevels.cpp
b/tests/texturing/depthstencil-render-miplevels.cpp
index af8f747..4f57e09 100644
--- a/tests/texturing/depthstencil-render-miplevels.cpp
+++ b/tests/texturing/depthstencil-render-miplevels.cpp
@@ -138,7 +138,7 @@ supported_format(GLenum internal_format)
GLuint
create_mipmapped_tex(GLenum internal_format)
{
- GLenum format;
+ GLenum format = GL_NONE;
if (!supported_format(internal_format))
return 0;
--
1.8.5.3
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit