glsl: Initialize glsl_type member name.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member name is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7766>
This commit is contained in:
Vinson Lee
2020-11-24 18:51:10 -08:00
parent daf339a479
commit 193888fd75
+2
View File
@@ -175,6 +175,8 @@ glsl_type::glsl_type(const glsl_type *return_type,
this->mem_ctx = ralloc_context(NULL);
assert(this->mem_ctx != NULL);
this->name = ralloc_strdup(this->mem_ctx, "");
this->fields.parameters = rzalloc_array(this->mem_ctx,
glsl_function_param, num_params + 1);