[PATCH libdrm 1/5] modetest: fix some compiler warnings

Eugeni Dodonov eugeni at dodonov.net
Thu Mar 29 19:08:39 PDT 2012


On Thu, Mar 29, 2012 at 18:28, Paulo Zanoni <przanoni at gmail.com> wrote:

> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
>
> Use unsigned int instead of int:
> - modetest.c:89:1: warning: comparison between signed and unsigned integer
> expressions [-Wsign-compare]
> - modetest.c:97:1: warning: comparison between signed and unsigned integer
> expressions [-Wsign-compare]
> - modetest.c:117:1: warning: comparison between signed and unsigned
> integer expressions [-Wsign-compare]
> - modetest.c:772:16: warning: comparison between signed and unsigned
> integer expressions [-Wsign-compare]
>
> The 'fd' variable is global, we don't need to pass it as an argument:
> - modetest.c:698:40: warning: unused parameter ‘fd’ [-Wunused-parameter]
>
> We don't use the 'modeset' variable:
> - modetest.c:725:8: warning: variable ‘modeset’ set but not used
> [-Wunused-but-set-variable]
>

This one is:
Reviewed-by: Eugeni Dodonov <eugeni.dodonov at intel.com>


-static int page_flipping_supported(int fd)
> +static int page_flipping_supported(void)
>

I wonder if we could drop the dead^W#ifd 0'ed code here as well, perhaps
with a separate patch? I don't think it will get used again in the future
(but I might be wrong).

-- 
Eugeni Dodonov
<http://eugeni.dodonov.net/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20120329/a01de1e0/attachment.htm>


More information about the dri-devel mailing list