[Piglit] [PATCH] arb_internalformat_query2: Initialize combined_value.

Alejandro Piñeiro apinheiro at igalia.com
Wed Mar 9 06:54:42 UTC 2016


On 09/03/16 04:10, Vinson Lee wrote:
> If support is false then it is uninitialized for print_failing_case_full.
>
> Fixes uninitialized scalar variable defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/spec/arb_internalformat_query2/max-dimensions.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/spec/arb_internalformat_query2/max-dimensions.c b/tests/spec/arb_internalformat_query2/max-dimensions.c
> index 255cdc3d2fd0..8825d84c77db 100644
> --- a/tests/spec/arb_internalformat_query2/max-dimensions.c
> +++ b/tests/spec/arb_internalformat_query2/max-dimensions.c
> @@ -612,13 +612,13 @@ try_max_combined_dimensions(const GLenum *targets, unsigned num_targets,
>          bool pass = true;
>          unsigned i;
>          unsigned j;
> -        GLint64 combined_value;
>  
>  	for (i = 0; i < num_targets; i++) {
>  		for (j = 0; j < num_internalformats; j++) {
>                          bool error_test;
>                          bool value_test = true;
>                          bool supported;
> +                        GLint64 combined_value = -1;
>  
>                          supported = is_resource_supported(data, GL_MAX_COMBINED_DIMENSIONS,
>                                                            targets[i],

Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>



More information about the Piglit mailing list