[Piglit] [PATCH] generatemipmap-base-change: Initialize change_size to false.
Brian Paul
brianp at vmware.com
Sat Apr 2 14:39:20 UTC 2016
On 04/02/2016 12:24 AM, Vinson Lee wrote:
> Otherwise change_size is always true and the size argument has no effect.
>
> Fixes "logically dead code" defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/texturing/generatemipmap-base-change.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/texturing/generatemipmap-base-change.c b/tests/texturing/generatemipmap-base-change.c
> index 3ea5698..e3b24cb 100644
> --- a/tests/texturing/generatemipmap-base-change.c
> +++ b/tests/texturing/generatemipmap-base-change.c
> @@ -44,7 +44,7 @@ piglit_init(int argc, char **argv)
> {
> #define MAX_SIZE 8
> GLubyte img[MAX_SIZE * MAX_SIZE * 4];
> - bool change_size = true, change_format = false;
> + bool change_size = false, change_format = false;
> int i;
> GLuint tex;
> GLsizei base_size, w0 = 0, h0 = 0;
>
The intention was to default to the 'size' test if no command line args
was present. Let me post a new patch that cleans this up a bit.
-Brian
More information about the Piglit
mailing list