From patchwork Mon Feb 9 21:39:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Vesely X-Patchwork-Id: 5803361 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6101CBF6C3 for ; Mon, 9 Feb 2015 21:40:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D40A2011B for ; Mon, 9 Feb 2015 21:40:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BB06C2011E for ; Mon, 9 Feb 2015 21:40:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBD146E5C7; Mon, 9 Feb 2015 13:40:06 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f51.google.com (mail-qg0-f51.google.com [209.85.192.51]) by gabe.freedesktop.org (Postfix) with ESMTP id B8EB96E5C2 for ; Mon, 9 Feb 2015 13:40:05 -0800 (PST) Received: by mail-qg0-f51.google.com with SMTP id z60so19897327qgd.10 for ; Mon, 09 Feb 2015 13:40:05 -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=eCcxiiLxPr4RvCmATl9i8Ki/mfJqYZe++3MSYQ4kZG0=; b=Tu5j2Vlo8U9Hed8BJfloxwaSIRMjxn2pYm/ZIsuCDSdTGo1Dii6QKvXELdFcVAbEL/ 8hi0UYSAhaA4x9v5te2ZjlrcL/3t66DDWa5RwxiRTr+Zjy3+ehCE02nCWkQ2BthRo86v DEH141inohK3dkW95u+Y71LISdv07MpOerrYP4hVaZL6gcMdzULCvUzBjyTVoO5tl+Wx 3McaYxojiwqjlms0gilObp+30s8DZcBxZOUKia3CH25FbgRUZ1AM2B6R6GImbg78EGE2 9u2fYOMHToDFjsrSC4ESdbg3v4Ssocdw+fKlXn/+Gimka2t6XjWQ41BklwkK62PXR9ip gIhw== X-Gm-Message-State: ALoCoQmJrShhjwidMAd3Xhd8d+vmksgyJW+C/omhqoxp6M7lJmKoVnmT7WhxtieXly41rwNm7hUR X-Received: by 10.224.53.130 with SMTP id m2mr46400159qag.13.1423518005167; Mon, 09 Feb 2015 13:40:05 -0800 (PST) Received: from adriatix.rutgers.edu ([198.151.130.142]) by mx.google.com with ESMTPSA id w21sm11294264qgd.15.2015.02.09.13.40.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Feb 2015 13:40:04 -0800 (PST) From: Jan Vesely To: dri-devel@lists.freedesktop.org Subject: [libdrm][PATCH 2/2] Fix gcc -Wextra warnings Date: Mon, 9 Feb 2015 16:39:55 -0500 Message-Id: <1423517995-28251-2-git-send-email-jan.vesely@rutgers.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1423517995-28251-1-git-send-email-jan.vesely@rutgers.edu> References: <1423517995-28251-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 Reviewed-by: Ian Romanick Reviewed-by: Emil Velikov Reviewed-by: Jan Vesely Acked-by: Jan Vesely --- tests/vbltest/vbltest.c | 3 ++- xf86drm.c | 4 ++-- xf86drmMode.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c index cdc1ef6..6e13c57 100644 --- a/tests/vbltest/vbltest.c +++ b/tests/vbltest/vbltest.c @@ -104,7 +104,8 @@ static void usage(char *name) int main(int argc, char **argv) { - int i, c, fd, ret; + unsigned i; + int c, fd, ret; char *modules[] = { "i915", "radeon", "nouveau", "vmwgfx", "exynos", "omapdrm", "tilcdc", "msm", "tegra" }; drmVBlank vbl; drmEventContext evctx; diff --git a/xf86drm.c b/xf86drm.c index 345325a..fb673b5 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -303,7 +303,7 @@ static int chown_check_return(const char *path, uid_t owner, gid_t group) * special file node with the major and minor numbers specified by \p dev and * parent directory if necessary and was called by root. */ -static int drmOpenDevice(long dev, int minor, int type) +static int drmOpenDevice(dev_t dev, int minor, int type) { stat_t st; const char *dev_name; @@ -2213,7 +2213,7 @@ int drmGetClient(int fd, int idx, int *auth, int *pid, int *uid, int drmGetStats(int fd, drmStatsT *stats) { drm_stats_t s; - int i; + unsigned i; if (drmIoctl(fd, DRM_IOCTL_GET_STATS, &s)) return -errno; diff --git a/xf86drmMode.c b/xf86drmMode.c index 60ce369..e3e599b 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -854,7 +854,7 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx) len = read(fd, buffer, sizeof buffer); if (len == 0) return 0; - if (len < sizeof *e) + if (len < (int)sizeof *e) return -1; i = 0;