display-kms: Fix compile warning
authorBenoit Parrot <bparrot@ti.com>
Mon, 24 Jul 2017 19:23:00 +0000 (19:23 +0000)
committerNikhil Devshatwar <nikhil.nd@ti.com>
Wed, 26 Jul 2017 08:10:59 +0000 (13:40 +0530)
Signed-off-by: Benoit Parrot <bparrot@ti.com>
util/display-kms.c

index 89c480e25e57e7a58464e408084f2b660895d4d4..c5b3c50fce5e613287586ea202be87df491fe73a 100644 (file)
@@ -340,12 +340,10 @@ int
 get_overlay_plane(struct display *disp, struct buffer *buf)
 {
        struct display_kms *disp_kms = to_display_kms(disp);
-       uint32_t i, ret;
+       uint32_t i;
+       int ret;
 
        for (i = 0; i < disp_kms->connectors_count; i++) {
-               struct connector *connector = &disp_kms->connector[i];
-               drmModeModeInfo *mode = connector->mode;
-
                disp_kms->ovr[i] = drmModeGetPlane(disp->fd,
                                        disp_kms->plane_resources->planes[1]);
 
@@ -365,6 +363,7 @@ post_vid_buffer(struct display *disp, struct buffer *buf,
 {
        struct display_kms *disp_kms = to_display_kms(disp);
        struct buffer_kms *buf_kms = to_buffer_kms(buf);
+       drmModePlane *ovr;
        int ret = 0;
        uint32_t i, j;
 
@@ -383,7 +382,7 @@ post_vid_buffer(struct display *disp, struct buffer *buf,
                                if (used_planes & (1 << j)) {
                                        continue;
                                }
-                               drmModePlane *ovr = drmModeGetPlane(disp->fd,
+                               ovr = drmModeGetPlane(disp->fd,
                                                disp_kms->plane_resources->planes[j]);
                                if (ovr->possible_crtcs & (1 << connector->pipe)) {
                                        disp_kms->ovr[i] = ovr;