[Mesa-dev] [PATCH 0/2] glsl: solve "uninitialized variable" warning false positive with function parameters

Alejandro Piñeiro apinheiro at igalia.com
Tue Apr 26 11:35:00 UTC 2016


Gentle after-one-week ping.

On 19/04/16 19:48, Alejandro Piñeiro wrote:
> This series solves the false positive that Ilia found recently.
>
> On the thread I mention that my preferred option would be try to set
> is_lhs before processing the function parameters on a pass similar to
> verify_parameter_modes, in order to avoid two different places raising
> the same warning. This is not possible because it is needed to process
> the parameters in order to match for the correct signature.
>
> Worth to mention that at his point is_lhs probably has lost his
> original meaning, and would be good to rename it. But I didn't find a
> good alternative name, so Im letting it as it is.
>
> Finally, this warning showed to involve several corner cases, so I
> think that it would be good to add some unit tests. At this point I
> think that the simpler would be have some small shaders and .expected
> files. The check would just execute glsl_compiler and compare the
> output with those .expected files (this would be similar to the glcpp
> tests).
>
> Alejandro Piñeiro (2):
>   glsl: add a empty set_is_lhs on ast_node
>   glsl: do not raise uninitialized warning with in/inout function
>     parameters
>
>  src/compiler/glsl/ast.h            |  2 ++
>  src/compiler/glsl/ast_function.cpp | 18 ++++++++++++++++++
>  src/compiler/glsl/ast_to_hir.cpp   |  5 +++++
>  3 files changed, 25 insertions(+)
>



More information about the mesa-dev mailing list