[Mesa-dev] [PATCH] glsl linker: Initialize member variable interface_namespace.
Kenneth Graunke
kenneth at whitecape.org
Wed Jun 5 23:05:35 PDT 2013
On 05/23/2013 11:54 PM, Vinson Lee wrote:
> Fixes "Uninitialized pointer field" defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> src/glsl/lower_named_interface_blocks.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/lower_named_interface_blocks.cpp b/src/glsl/lower_named_interface_blocks.cpp
> index eba667a..922cc02 100644
> --- a/src/glsl/lower_named_interface_blocks.cpp
> +++ b/src/glsl/lower_named_interface_blocks.cpp
> @@ -72,7 +72,8 @@ public:
> hash_table *interface_namespace;
>
> flatten_named_interface_blocks_declarations(void *mem_ctx)
> - : mem_ctx(mem_ctx)
> + : mem_ctx(mem_ctx),
> + interface_namespace(NULL)
> {
> }
From my reading, this shouldn't lead to any actual issues, but
initializing member variables is generally a good idea.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list