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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user