From patchwork Fri Feb 27 18:07:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Vesely X-Patchwork-Id: 5902391 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B1C089F36A for ; Fri, 27 Feb 2015 18:07:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8FEF20218 for ; Fri, 27 Feb 2015 18:07:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EA6F7201F4 for ; Fri, 27 Feb 2015 18:07:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0883A6E93B; Fri, 27 Feb 2015 10:07:43 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f50.google.com (mail-qg0-f50.google.com [209.85.192.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 41EC26E937 for ; Fri, 27 Feb 2015 10:07:34 -0800 (PST) Received: by mail-qg0-f50.google.com with SMTP id e89so15388104qgf.9 for ; Fri, 27 Feb 2015 10:07:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=85I+fYy6k9vcASpoqEWJwArCu7+gS3hKI/KXCjBcRfk=; b=PMK3eEvI510ZVUIodgk8hDSJwhumWxU+I/WE0ec6IopojIifnS2KdafU2z3Rcqm5US BSelopKzAukaamm/nTXShjT4tYYZPBUtX8D3EgSEr4vO+PlfKIF4ShDMgTqeyXdvISkU cEdV8wDFWZibZwxWUZF7rFT8XZPy5QBcz00QsSwe20zd/HwJKCo4UQkoIW9fMFCr+NpP 9tD9F6RDlQQZ9PPFOiaC7efFA4ycWhiJA0hLa15VOErHvQu9XU+zi6uDM8Tmg8mQtvh7 4EYs08yVZ9hIolV54UYfGFSzIhLW2ZMHMJUfu6nQga2S41WEvm9bRoy0MS4e915ecSFv NmBg== X-Gm-Message-State: ALoCoQkBA5R8DBJVn2pkZ8aeMHC6IUd4EK31lDslZwan6UNjlTtpyWWVTMQKgBaXNQ+iZSyhtZuO X-Received: by 10.140.231.151 with SMTP id b145mr30811139qhc.22.1425060453865; Fri, 27 Feb 2015 10:07:33 -0800 (PST) Received: from adriatix.rutgers.edu ([198.151.130.147]) by mx.google.com with ESMTPSA id 70sm3062318qhe.29.2015.02.27.10.07.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 10:07:33 -0800 (PST) From: Jan Vesely To: Emil Velikov , dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 7/8] Fix unused, and unused-but-set variables warnings Date: Fri, 27 Feb 2015 13:07:27 -0500 Message-Id: <1425060448-5315-8-git-send-email-jan.vesely@rutgers.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1425060448-5315-1-git-send-email-jan.vesely@rutgers.edu> References: <1425060448-5315-1-git-send-email-jan.vesely@rutgers.edu> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jan Vesely --- tests/exynos/exynos_fimg2d_test.c | 4 +--- 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 ba8d12c..38ea974 100644 --- a/tests/exynos/exynos_fimg2d_test.c +++ b/tests/exynos/exynos_fimg2d_test.c @@ -322,7 +322,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; @@ -336,8 +336,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; diff --git a/xf86drm.c b/xf86drm.c index 016247f..3c8fc0b 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -308,10 +308,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; @@ -333,7 +336,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) @@ -354,6 +356,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); }