Re: [Mesa-dev] [PATCH 3/4] i965: Silence compiler warning about promoted_constants.
On 13/03/18 17:38, Eric Anholt wrote: We only have a cfg != NULL if we went through one of the paths that set it, but my compiler doesn't figure that out. Cc: Jason EkstrandReviewed-by: Lionel Landwerlin Fixes: 6411defdcd6f ("intel/cs: Re-run final NIR optimizations for each SIMD size") --- src/intel/compiler/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 422eedcf0af1..8529fda6f091 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -7220,7 +7220,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data, fs_visitor *v8 = NULL, *v16 = NULL, *v32 = NULL; cfg_t *cfg = NULL; const char *fail_msg = NULL; - unsigned promoted_constants; + unsigned promoted_constants = 0; /* Now the main event: Visit the shader IR and generate our CS IR for it. */ ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/4] i965: Silence compiler warning about promoted_constants.
We only have a cfg != NULL if we went through one of the paths that set it, but my compiler doesn't figure that out. Cc: Jason EkstrandFixes: 6411defdcd6f ("intel/cs: Re-run final NIR optimizations for each SIMD size") --- src/intel/compiler/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 422eedcf0af1..8529fda6f091 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -7220,7 +7220,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data, fs_visitor *v8 = NULL, *v16 = NULL, *v32 = NULL; cfg_t *cfg = NULL; const char *fail_msg = NULL; - unsigned promoted_constants; + unsigned promoted_constants = 0; /* Now the main event: Visit the shader IR and generate our CS IR for it. */ -- 2.16.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev