summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-05-09 17:30:35 -0700
committerEric Anholt <[email protected]>2019-05-13 15:37:01 -0700
commit06168d3f6ab2564664927d823e632939613b27eb (patch)
treeb6dac664957a1ec39330407be9eb98efb4136abb /src/gallium
parentc49f0159bd04e72119a63ce96ae385b53112cc44 (diff)
freedreno: Silence compiler warnings about uninit 'layers'
My gcc can't see that the uninitialized value from the PIPE_BUFFER case isn't used from the !PIPE_BUFFER cases later. Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_texture.c2
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_texture.c2
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_texture.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
index 748e08e1f7f..306da8de15b 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
@@ -223,7 +223,7 @@ fd4_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
struct fd4_pipe_sampler_view *so = CALLOC_STRUCT(fd4_pipe_sampler_view);
struct fd_resource *rsc = fd_resource(prsc);
enum pipe_format format = cso->format;
- unsigned lvl, layers;
+ unsigned lvl, layers = 0;
uint32_t sz2 = 0;
if (!so)
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c
index e8e29d0367a..1ebaa3a4587 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c
@@ -199,7 +199,7 @@ fd5_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
struct fd5_pipe_sampler_view *so = CALLOC_STRUCT(fd5_pipe_sampler_view);
struct fd_resource *rsc = fd_resource(prsc);
enum pipe_format format = cso->format;
- unsigned lvl, layers;
+ unsigned lvl, layers = 0;
if (!so)
return NULL;
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
index 9c42a6b8151..80eb9906ebe 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
@@ -220,7 +220,7 @@ fd6_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
struct fd6_pipe_sampler_view *so = CALLOC_STRUCT(fd6_pipe_sampler_view);
struct fd_resource *rsc = fd_resource(prsc);
enum pipe_format format = cso->format;
- unsigned lvl, layers;
+ unsigned lvl, layers = 0;
if (!so)
return NULL;