[2/4] glsl: init non-static class member in link uniforms.

Submitted by Dave Airlie on May 17, 2019, 2:22 a.m.

Details

Message ID 20190517022224.11398-2-airlied@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Dave Airlie May 17, 2019, 2:22 a.m.
From: Dave Airlie <airlied@redhat.com>

link_uniforms.cpp:477: uninit_member: Non-static class member "shader_storage_blocks_write_access" is not initialized in this constructor nor in any functions that it calls.

Reported by coverity.
---
 src/compiler/glsl/link_uniforms.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp
index aa96227a7e1..641d38689bf 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -472,7 +472,8 @@  public:
                               bool use_std430_as_default)
       : prog(prog), map(map), uniforms(uniforms),
         use_std430_as_default(use_std430_as_default), values(values),
-        bindless_targets(NULL), bindless_access(NULL)
+        bindless_targets(NULL), bindless_access(NULL),
+        shader_storage_blocks_write_access(9)
    {
    }
 

Comments

On Thu, May 16, 2019 at 10:22 PM Dave Airlie <airlied@gmail.com> wrote:
>
> From: Dave Airlie <airlied@redhat.com>
>
> link_uniforms.cpp:477: uninit_member: Non-static class member "shader_storage_blocks_write_access" is not initialized in this constructor nor in any functions that it calls.
>
> Reported by coverity.
> ---
>  src/compiler/glsl/link_uniforms.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp
> index aa96227a7e1..641d38689bf 100644
> --- a/src/compiler/glsl/link_uniforms.cpp
> +++ b/src/compiler/glsl/link_uniforms.cpp
> @@ -472,7 +472,8 @@ public:
>                                bool use_std430_as_default)
>        : prog(prog), map(map), uniforms(uniforms),
>          use_std430_as_default(use_std430_as_default), values(values),
> -        bindless_targets(NULL), bindless_access(NULL)
> +        bindless_targets(NULL), bindless_access(NULL),
> +        shader_storage_blocks_write_access(9)

Probably meant 0 here. With that, the series is

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>

>     {
>     }
>
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev