[Mesa-dev] [PATCH] r600g: Fix Clang return-type build error.

Tom Stellard tom at stellard.net
Wed May 6 11:27:45 PDT 2015


On Wed, May 06, 2015 at 10:24:18AM -0700, Vinson Lee wrote:
> Fix Clang return-type error introduced with commit
> 96f164f6f047833091eb98a73aa80c31dc94f962 "gallium: make
> pipe_context::begin_query return a boolean".
> 
>   CC       r600_query.lo
> r600_query.c:443:3: error: non-void function 'r600_begin_query' should return a value [-Wreturn-type]
>                 return;
>                 ^
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> ---
>  src/gallium/drivers/radeon/r600_query.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
> index 28a814a..71f4a15 100644
> --- a/src/gallium/drivers/radeon/r600_query.c
> +++ b/src/gallium/drivers/radeon/r600_query.c
> @@ -440,7 +440,7 @@ static boolean r600_begin_query(struct pipe_context *ctx,
>  	/* Non-GPU queries. */
>  	switch (rquery->type) {
>  	case PIPE_QUERY_TIMESTAMP_DISJOINT:
> -		return;
> +		return true;
>  	case R600_QUERY_DRAW_CALLS:
>  		rquery->begin_result = rctx->num_draw_calls;
>  		return true;
> -- 
> 2.1.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list