[Mesa-dev] [PATCH] glsl: Initialize builtin_builder member variables.

Vinson Lee vlee at freedesktop.org
Mon Sep 9 20:48:01 PDT 2013


Fixes "Uninitialized pointer field" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/glsl/builtin_functions.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
index 39127e6..ce78df1 100644
--- a/src/glsl/builtin_functions.cpp
+++ b/src/glsl/builtin_functions.cpp
@@ -525,6 +525,9 @@ private:
  *  @{
  */
 builtin_builder::builtin_builder()
+   : shader(NULL),
+     gl_ModelViewProjectionMatrix(NULL),
+     gl_Vertex(NULL)
 {
    mem_ctx = NULL;
 }
-- 
1.8.1.2



More information about the mesa-dev mailing list