diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2015-02-27 12:47:46 -0500 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2015-03-14 17:02:06 -0400 |
commit | 0706c14e7cc5f1d996bb1c3c526f877c4f8fc215 (patch) | |
tree | ece8b3813bb5c3a660df0d41221e7871a568a383 | |
parent | 13e34308b70a9e0e7682ae7ced29a4aa0c3ad281 (diff) |
Fix unused, and unused-but-set variables warnings
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
-rw-r--r-- | tests/exynos/exynos_fimg2d_test.c | 4 | ||||
-rw-r--r-- | xf86drm.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c index 14b38a9e..8e20e27b 100644 --- a/tests/exynos/exynos_fimg2d_test.c +++ b/tests/exynos/exynos_fimg2d_test.c @@ -360,7 +360,7 @@ static int g2d_copy_with_scale_test(struct exynos_device *dev, { struct g2d_context *ctx; struct g2d_image src_img, dst_img; - unsigned int src_x, src_y, dst_x, dst_y, img_w, img_h; + unsigned int src_x, src_y, img_w, img_h; unsigned long userptr, size; int ret; @@ -374,8 +374,6 @@ static int g2d_copy_with_scale_test(struct exynos_device *dev, src_x = 0; src_y = 0; - dst_x = 0; - dst_y = 0; img_w = screen_width; img_h = screen_height; @@ -313,10 +313,13 @@ static int drmOpenDevice(dev_t dev, int minor, int type) char buf[64]; int fd; mode_t devmode = DRM_DEV_MODE, serv_mode; + gid_t serv_group; +#if !defined(UDEV) int isroot = !geteuid(); uid_t user = DRM_DEV_UID; - gid_t group = DRM_DEV_GID, serv_group; - + gid_t group = DRM_DEV_GID; +#endif + switch (type) { case DRM_NODE_PRIMARY: dev_name = DRM_DEV_NAME; @@ -338,7 +341,6 @@ static int drmOpenDevice(dev_t dev, int minor, int type) drm_server_info->get_perms(&serv_group, &serv_mode); devmode = serv_mode ? serv_mode : DRM_DEV_MODE; devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH); - group = (serv_group >= 0) ? serv_group : DRM_DEV_GID; } #if !defined(UDEV) @@ -359,6 +361,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type) } if (drm_server_info) { + group = (serv_group >= 0) ? serv_group : DRM_DEV_GID; chown_check_return(buf, user, group); chmod(buf, devmode); } |