Mesa (main): intel/blorp: fix a compile warning about uninitialized use

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 5 12:13:11 UTC 2021


Module: Mesa
Branch: main
Commit: 811bf72f9fd45a08d00e02c89c41a639c5bbc0a1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=811bf72f9fd45a08d00e02c89c41a639c5bbc0a1

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Tue Oct  5 13:16:51 2021 +0300

intel/blorp: fix a compile warning about uninitialized use

warning: ‘bind_offset’ may be used uninitialized in this function

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13190>

---

 src/intel/blorp/blorp_genX_exec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
index 0270ee9cd50..b9149726a8e 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -1559,7 +1559,7 @@ blorp_setup_binding_table(struct blorp_batch *batch,
                            const struct blorp_params *params)
 {
    const struct isl_device *isl_dev = batch->blorp->isl_dev;
-   uint32_t surface_offsets[2], bind_offset;
+   uint32_t surface_offsets[2], bind_offset = 0;
    void *surface_maps[2];
 
    UNUSED bool has_indirect_clear_color = false;



More information about the mesa-commit mailing list