[Mesa-dev] [PATCH v2] mesa/main: Fix missing return in non void function
Alejandro Piñeiro
apinheiro at igalia.com
Fri Aug 26 06:48:09 UTC 2016
On 25/08/16 23:48, Tobias Klausmann wrote:
> This was found by obs:
> I: Program returns random data in a function
> E: Mesa no-return-in-nonvoid-function main/program_resource.c:109
>
> Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> V2:
> Remove the !, cosmetic change, as the macro expansion stringifies everything:
> __assert_fail ("!!\"unexpected programInterface value\"", ...) ->
> __assert_fail ("!\"unexpected programInterface value\"", ...)
>
>
> Somebody else hast to push this! (I'dont have access to the fdo repos)
Just done. I added a summarized v2 on the patch. The common is adding
those v2, v3 etc comments on the commit message itself, not on the
annotate section.
Thanks for the patch
>
>
> src/mesa/main/program_resource.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/program_resource.c b/src/mesa/main/program_resource.c
> index 6ddbdad..5726ce1 100644
> --- a/src/mesa/main/program_resource.c
> +++ b/src/mesa/main/program_resource.c
> @@ -104,7 +104,7 @@ stage_from_program_interface(GLenum programInterface)
> case GL_COMPUTE_SUBROUTINE_UNIFORM:
> return MESA_SHADER_COMPUTE;
> default:
> - assert(!"unexpected programInterface value");
> + unreachable("unexpected programInterface value");
> }
> }
>
>
--
Alejandro Piñeiro <apinheiro at igalia.com>
More information about the mesa-dev
mailing list