From 3b3a3af9c7680fc75be0745fa3e58f204227a7d9 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 28 Sep 2020 18:20:32 -0700 Subject: [PATCH] glsl: Initialize ast_node member field location.path in constructor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix defect reported by Coverity Scan. Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member field location.path is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Vinson Lee Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/glsl_parser_extras.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 8fb7cbd5a2f..48c0fc8f217 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -1188,6 +1188,7 @@ ast_node::print(void) const ast_node::ast_node(void) { + this->location.path = NULL; this->location.source = 0; this->location.first_line = 0; this->location.first_column = 0;