Mesa (master): glsl: Initialize per_vertex_accumulator::fields.

Vinson Lee vlee at kemper.freedesktop.org
Sat Oct 19 01:31:15 UTC 2013


Module: Mesa
Branch: master
Commit: 37cd9ac6dfcff10ab7b08c4f3b17a2cfe3a6d7e7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=37cd9ac6dfcff10ab7b08c4f3b17a2cfe3a6d7e7

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Fri Oct 11 23:14:47 2013 -0700

glsl: Initialize per_vertex_accumulator::fields.

Fixes "Uninitialized pointer field" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>

---

 src/glsl/builtin_variables.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index f06d2ab..64f3406 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -311,7 +311,8 @@ private:
 
 
 per_vertex_accumulator::per_vertex_accumulator()
-   : num_fields(0)
+   : fields(),
+     num_fields(0)
 {
 }
 




More information about the mesa-commit mailing list