diff options
author | Eric Anholt <eric@anholt.net> | 2009-03-27 16:04:25 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-03-27 16:04:25 -0700 |
commit | 0581738c7a02d45518d60924bd8cafa5446d4019 (patch) | |
tree | 90c4dcbf1289855ae3ad877db6a01a0bd0379c55 /tests/gem_readwrite.c | |
parent | 1eabfa9a142a314adeaba7a691e9cf85e026f79c (diff) |
tests/: warning fixes
Diffstat (limited to 'tests/gem_readwrite.c')
-rw-r--r-- | tests/gem_readwrite.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c index bd1d232b..26498fb4 100644 --- a/tests/gem_readwrite.c +++ b/tests/gem_readwrite.c @@ -25,6 +25,7 @@ * */ +#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -33,12 +34,15 @@ #include <inttypes.h> #include <errno.h> #include <sys/stat.h> +#include <sys/ioctl.h> #include "drm.h" #include "i915_drm.h" +#include "drmtest.h" #define OBJECT_SIZE 16384 -int do_read(int fd, int handle, void *buf, int offset, int size) +static int +do_read(int fd, int handle, void *buf, int offset, int size) { struct drm_i915_gem_pread read; @@ -56,7 +60,8 @@ int do_read(int fd, int handle, void *buf, int offset, int size) return ioctl(fd, DRM_IOCTL_I915_GEM_PREAD, &read); } -int do_write(int fd, int handle, void *buf, int offset, int size) +static int +do_write(int fd, int handle, void *buf, int offset, int size) { struct drm_i915_gem_pwrite write; @@ -94,7 +99,6 @@ int main(int argc, char **argv) printf("Testing read beyond end of buffer.\n"); ret = do_read(fd, handle, buf, OBJECT_SIZE / 2, OBJECT_SIZE); - printf("%d %d\n", ret, errno); assert(ret == -1 && errno == EINVAL); printf("Testing full write of buffer\n"); |