[PATCH rendercheck] fix compiler warnings

Aaron Plattner aplattner at nvidia.com
Tue Jan 21 11:38:01 PST 2014


On 01/20/14 15:06, Robert Morell wrote:
> From: Matt Craighead <mcraighead at nvidia.com>
>
> Removed redundant declarations.  Removed an unused variable.
> Fixed the sign of some loop variables.
>
> Signed-off-by: Matt Craighead <mcraighead at nvidia.com>
> Signed-off-by: Robert Morell <rmorell at nvidia.com>

diff of warnings with -Wall -Wextra says this fixes nineteen warnings 
and introduces zero, so

Reviewed-by: Aaron Plattner <aplattner at nvidia.com>

and pushed:

To git.freedesktop.org:/git/xorg/app/rendercheck
    b015a64..2fd8151  HEAD -> master

> ---
>   main.c        | 3 ---
>   rendercheck.h | 4 ----
>   t_repeat.c    | 2 +-
>   tests.c       | 2 --
>   4 files changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/main.c b/main.c
> index 5e6404cda1ad..51df7e4bc3ef 100644
> --- a/main.c
> +++ b/main.c
> @@ -27,9 +27,6 @@
>   #include <strings.h>
>   #include <getopt.h>
>
> -extern int num_ops;
> -extern int num_colors;
> -
>   Bool is_verbose = FALSE, minimalrendering = FALSE;
>   int enabled_tests = ~0;		/* Enable all tests by default */
>
> diff --git a/rendercheck.h b/rendercheck.h
> index 92ce7896ce52..18417a8efa7b 100644
> --- a/rendercheck.h
> +++ b/rendercheck.h
> @@ -206,10 +206,6 @@ repeat_test(Display *dpy, picture_info *win, picture_info *dst, int op,
>       Bool test_mask);
>
>   Bool
> -linear_gradient_test(Display *dpy, picture_info *win,
> -    picture_info *dst, int op, picture_info *dst_color);
> -
> -Bool
>   triangles_test(Display *dpy, picture_info *win, picture_info *dst, int op,
>       picture_info *src_color, picture_info *dst_color);
>
> diff --git a/t_repeat.c b/t_repeat.c
> index 679bca1fd8a2..1abe542ae5f4 100644
> --- a/t_repeat.c
> +++ b/t_repeat.c
> @@ -49,7 +49,7 @@ Bool
>   repeat_test(Display *dpy, picture_info *win, picture_info *dst, int op,
>       picture_info *dst_color, picture_info *c1, picture_info *c2, Bool test_mask)
>   {
> -	int wi, hi;
> +	unsigned int wi, hi;
>
>   	for (wi = 0; wi < sizeof(sizes) / sizeof(int); wi++) {
>   	    int w = sizes[wi];
> diff --git a/tests.c b/tests.c
> index aacd14ddb1a2..bacc3724dc58 100644
> --- a/tests.c
> +++ b/tests.c
> @@ -390,14 +390,12 @@ do_tests(Display *dpy, picture_info *win)
>   		errx(1, "malloc error");
>
>   	for (i = 0; i < num_colors * nformats; i++) {
> -		XRenderPictureAttributes pa;
>   		color4d *c = &colors[i / nformats];
>
>   		/* The standard PictFormat numbers go from 0 to 4 */
>   		pictures_10x10[i].format = format_list[i % nformats];
>   		pictures_10x10[i].d = XCreatePixmap(dpy, DefaultRootWindow(dpy),
>   		    10, 10, pictures_10x10[i].format->depth);
> -		pa.repeat = TRUE;
>   		pictures_10x10[i].pict = XRenderCreatePicture(dpy,
>   		    pictures_10x10[i].d, pictures_10x10[i].format, 0, NULL);
>
>



More information about the xorg-devel mailing list