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

Author: Caio Marcelo de Oliveira Filho <[email protected]>
Date:   Fri Aug 23 07:59:21 2019 -0700

intel/decoders: Avoid uninitialized variable warnings

Initialize `next_batch_addr` and `second_level`.  If the batch is well
formed, those values will be overriden, if not, they are as good as
uninitialized garbage.

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

---

 src/intel/tools/aubinator_viewer_decoder.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/tools/aubinator_viewer_decoder.cpp 
b/src/intel/tools/aubinator_viewer_decoder.cpp
index f9586590221..44038a9b226 100644
--- a/src/intel/tools/aubinator_viewer_decoder.cpp
+++ b/src/intel/tools/aubinator_viewer_decoder.cpp
@@ -955,9 +955,9 @@ aub_viewer_render_batch(struct aub_viewer_decode_ctx *ctx,
       }
 
       if (strcmp(inst_name, "MI_BATCH_BUFFER_START") == 0) {
-         uint64_t next_batch_addr;
+         uint64_t next_batch_addr = 0xd0d0d0d0;
          bool ppgtt = false;
-         bool second_level;
+         bool second_level = false;
          struct gen_field_iterator iter;
          gen_field_iterator_init(&iter, inst, p, 0, false);
          while (gen_field_iterator_next(&iter)) {

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

Reply via email to