Module: Mesa
Branch: master
Commit: bfac462d929ba2b97c7fb3561f00cf5ff6dde22f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfac462d929ba2b97c7fb3561f00cf5ff6dde22f

Author: Caio Marcelo de Oliveira Filho <[email protected]>
Date:   Fri Aug 23 09:12:02 2019 -0700

i965: Silence brw_blorp uninitialized warning

The variables level and start_layer are not initialized, then
initialized if we have a BUFFER_BIT_DEPTH set.  We assert on them
later using the same check.  This should be enough but GCC 9.1.1 is
not convinced, so let's initialize the variables.

Acked-by: Eric Engestrom <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>

---

 src/mesa/drivers/dri/i965/brw_blorp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c 
b/src/mesa/drivers/dri/i965/brw_blorp.c
index 044b9d045e3..dc7862b407d 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -1405,7 +1405,7 @@ brw_blorp_clear_depth_stencil(struct brw_context *brw,
    if (x0 == x1 || y0 == y1)
       return;
 
-   uint32_t level, start_layer, num_layers;
+   uint32_t level = 0, start_layer = 0, num_layers;
    struct blorp_surf depth_surf, stencil_surf;
 
    struct intel_mipmap_tree *depth_mt = NULL;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to