All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Vesely <jan.vesely@rutgers.edu>
To: dri-devel@lists.freedesktop.org
Subject: [libdrm][PATCH 2/2] Fix gcc -Wextra warnings
Date: Mon,  9 Feb 2015 16:39:55 -0500	[thread overview]
Message-ID: <1423517995-28251-2-git-send-email-jan.vesely@rutgers.edu> (raw)
In-Reply-To: <1423517995-28251-1-git-send-email-jan.vesely@rutgers.edu>

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
---
 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;
-- 
2.1.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-02-09 21:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 21:39 [libdrm][PATCH 1/2] random: Use unsigned long for seed Jan Vesely
2015-02-09 21:39 ` Jan Vesely [this message]
2015-02-09 23:12   ` [libdrm][PATCH 2/2] Fix gcc -Wextra warnings Ian Romanick
2015-02-09 23:32   ` Emil Velikov
2015-02-10  0:02     ` Jan Vesely
2015-02-10  0:27       ` Emil Velikov
2015-02-10 21:37         ` Jan Vesely
2015-02-10 22:55           ` Emil Velikov
2015-02-09 23:11 ` [libdrm][PATCH 1/2] random: Use unsigned long for seed Ian Romanick
2015-02-09 23:26   ` Jan Vesely
2015-02-09 23:28   ` [libdrm][PATCH v2 " Jan Vesely
2015-02-10 18:21     ` Ian Romanick
2015-02-10  0:10 ` [libdrm][PATCH 3/2] Fix always true comparison Jan Vesely
2015-02-25 17:11   ` Jan Vesely
2015-02-25 18:41     ` Emil Velikov
2015-03-02 20:01       ` Jan Vesely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423517995-28251-2-git-send-email-jan.vesely@rutgers.edu \
    --to=jan.vesely@rutgers.edu \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.