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

Kenneth Graunke kenneth at whitecape.org
Mon Sep 9 23:15:04 PDT 2013


On 09/09/2013 08:48 PM, Vinson Lee wrote:
> 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;
>  }

I don't think this should matter, but it shouldn't hurt anything either.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>



More information about the mesa-dev mailing list