[Mesa-dev] [PATCH] draw: silence uninitialized variable warning

Roland Scheidegger sroland at vmware.com
Fri Dec 19 09:50:31 PST 2014


Am 19.12.2014 um 18:37 schrieb Brian Paul:
> v2: move initialization of llvm_gs to declaration.
> ---
>  src/gallium/auxiliary/draw/draw_gs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
> index 40f7ed3..6375d41 100644
> --- a/src/gallium/auxiliary/draw/draw_gs.c
> +++ b/src/gallium/auxiliary/draw/draw_gs.c
> @@ -715,7 +715,7 @@ draw_create_geometry_shader(struct draw_context *draw,
>  {
>  #ifdef HAVE_LLVM
>     boolean use_llvm = draw->llvm != NULL;
> -   struct llvm_geometry_shader *llvm_gs;
> +   struct llvm_geometry_shader *llvm_gs = NULL;
>  #endif
>     struct draw_geometry_shader *gs;
>     unsigned i;
> 

Patches look good to me. The compiler seems to be rather dumb though.

Roland



More information about the mesa-dev mailing list