summaryrefslogtreecommitdiffstats
path: root/src/util/tests
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2018-07-16 14:59:32 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2018-07-18 08:29:51 -0700
commit577c8d72882a909ae7d2c90d7c8250c77475f9a4 (patch)
treeb2b391f6dcf6c4674400d91a83f6c088acf05a9b /src/util/tests
parent8ec40824aefe33b014b715276dfdd6ea4edb262b (diff)
i965/miptree: avoid uninitialized variable warnings
GCC 8.1.1 is having a hard time identifying that the values are properly initialized when used. In the 'memset_value' case, we pass the uninitialized value to another function (that will use only if the conditions match the initialization). Just give enough hint to the compiler to figure things out. Fixes the warnings ../../src/mesa/drivers/dri/i965/intel_mipmap_tree.c: In function ‘intel_miptree_alloc_aux’: ../../src/mesa/drivers/dri/i965/intel_mipmap_tree.c:1839:18: warning: ‘memset_value’ may be used uninitialized in this function [-Wmaybe-uninitialized] mt->aux_buf = intel_alloc_aux_buffer(brw, &aux_surf, needs_memset, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ memset_value); ~~~~~~~~~~~~~ ../../src/mesa/drivers/dri/i965/intel_mipmap_tree.c:1698:10: warning: ‘initial_state’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (wants_memset) ^ ../../src/mesa/drivers/dri/i965/intel_mipmap_tree.c:1772:23: note: ‘initial_state’ was declared here enum isl_aux_state initial_state; ^~~~~~~~~~~~~ Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/util/tests')
0 files changed, 0 insertions, 0 deletions