[PATCH 4/8] fix warn in gem_readwrite: 'read/write' shadows a global declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 tests/gem_readwrite.c |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c
index 68c3ff2..d3d69e3 100644
--- a/tests/gem_readwrite.c
+++ b/tests/gem_readwrite.c
@@ -44,34 +44,34 @@
 static int
 do_read(int fd, int handle, void *buf, int offset, int size)
 {
-	struct drm_i915_gem_pread read;
+	struct drm_i915_gem_pread gem_pread;
 
 	/* Ensure that we don't have any convenient data in buf in case
 	 * we fail.
 	 */
 	memset(buf, 0xd0, size);
 
-	memset(&read, 0, sizeof(read));
-	read.handle = handle;
-	read.data_ptr = (uintptr_t)buf;
-	read.size = size;
-	read.offset = offset;
+	memset(&gem_pread, 0, sizeof(gem_pread));
+	gem_pread.handle = handle;
+	gem_pread.data_ptr = (uintptr_t)buf;
+	gem_pread.size = size;
+	gem_pread.offset = offset;
 
-	return ioctl(fd, DRM_IOCTL_I915_GEM_PREAD, &read);
+	return ioctl(fd, DRM_IOCTL_I915_GEM_PREAD, &gem_pread);
 }
 
 static int
 do_write(int fd, int handle, void *buf, int offset, int size)
 {
-	struct drm_i915_gem_pwrite write;
+	struct drm_i915_gem_pwrite gem_pwrite;
 
-	memset(&write, 0, sizeof(write));
-	write.handle = handle;
-	write.data_ptr = (uintptr_t)buf;
-	write.size = size;
-	write.offset = offset;
+	memset(&gem_pwrite, 0, sizeof(gem_pwrite));
+	gem_pwrite.handle = handle;
+	gem_pwrite.data_ptr = (uintptr_t)buf;
+	gem_pwrite.size = size;
+	gem_pwrite.offset = offset;
 
-	return ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write);
+	return ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &gem_pwrite);
 }
 
 int main(int argc, char **argv)
-- 
1.7.9.5



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux