[Intel-gfx] [PATCH v2 08/11] build: Fix assorted compilation warnings

oscar.mateo at intel.com oscar.mateo at intel.com
Tue Nov 12 12:50:42 CET 2013


From: Oscar Mateo <oscar.mateo at intel.com>

As these files are compiled for every test, the warnings cluttered
the Android build completely.

v2: As suggested by Daniel Vetter, drop some of the fixes and fix
the compilation flags instead.

Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
---
 lib/drmtest.c           |    6 +++---
 lib/drmtest.h           |    4 ++--
 lib/intel_batchbuffer.h |    2 +-
 lib/intel_gpu_tools.h   |    2 +-
 lib/intel_reg_map.c     |    4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 38463f8..44fd30e 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -306,7 +306,7 @@ int drm_open_any_render(void)
 	return fd;
 }
 
-int __gem_set_tiling(int fd, uint32_t handle, int tiling, int stride)
+int __gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride)
 {
 	struct drm_i915_gem_set_tiling st;
 	int ret;
@@ -326,7 +326,7 @@ int __gem_set_tiling(int fd, uint32_t handle, int tiling, int stride)
 	return 0;
 }
 
-void gem_set_tiling(int fd, uint32_t handle, int tiling, int stride)
+void gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride)
 {
 	igt_assert(__gem_set_tiling(fd, handle, tiling, stride) == 0);
 }
@@ -654,7 +654,7 @@ off_t prime_get_size(int dma_buf_fd)
 /* signal interrupt helpers */
 static bool igt_only_list_subtests(void);
 
-static int exit_handler_count;
+static unsigned int exit_handler_count;
 
 static struct igt_helper_process signal_helper;
 long long int sig_stat;
diff --git a/lib/drmtest.h b/lib/drmtest.h
index ce9d18d..5295a7b 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -54,8 +54,8 @@ int drm_open_any_render(void);
 void gem_quiescent_gpu(int fd);
 
 /* ioctl wrappers and similar stuff for bare metal testing */
-void gem_set_tiling(int fd, uint32_t handle, int tiling, int stride);
-int __gem_set_tiling(int fd, uint32_t handle, int tiling, int stride);
+void gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride);
+int __gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride);
 bool gem_has_enable_ring(int fd,int param);
 bool gem_has_bsd(int fd);
 bool gem_has_blt(int fd);
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index a799969..11b7e6e 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -47,7 +47,7 @@ void intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
  * work...
  */
 #pragma GCC diagnostic ignored "-Winline"
-static inline int
+static inline unsigned int
 intel_batchbuffer_space(struct intel_batchbuffer *batch)
 {
 	return (BATCH_SZ - BATCH_RESERVED) - (batch->ptr - batch->buffer);
diff --git a/lib/intel_gpu_tools.h b/lib/intel_gpu_tools.h
index faa948c..412e465 100644
--- a/lib/intel_gpu_tools.h
+++ b/lib/intel_gpu_tools.h
@@ -74,7 +74,7 @@ struct intel_register_map {
 	uint32_t alignment_mask;
 };
 struct intel_register_map intel_get_register_map(uint32_t devid);
-struct intel_register_range *intel_get_register_range(struct intel_register_map map, uint32_t offset, int mode);
+struct intel_register_range *intel_get_register_range(struct intel_register_map map, uint32_t offset, uint32_t mode);
 
 
 static inline uint32_t
diff --git a/lib/intel_reg_map.c b/lib/intel_reg_map.c
index 0c8d49c..26ddd06 100644
--- a/lib/intel_reg_map.c
+++ b/lib/intel_reg_map.c
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2011 Intel Corporation
+ * Copyright © 2011 Intel Corporation
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -151,7 +151,7 @@ intel_get_register_map(uint32_t devid)
 }
 
 struct intel_register_range *
-intel_get_register_range(struct intel_register_map map, uint32_t offset, int mode)
+intel_get_register_range(struct intel_register_map map, uint32_t offset, uint32_t mode)
 {
 	struct intel_register_range *range = map.map;
 	uint32_t align = map.alignment_mask;
-- 
1.7.9.5




More information about the Intel-gfx mailing list