summaryrefslogtreecommitdiff
path: root/tests/modetest/buffers.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-02-11 21:36:30 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-08-05 14:21:43 +0200
commitca9c8f06e0f560082dcd0943e9be29ba9a915ee3 (patch)
tree8722c056cb3c39499ba08a27fb5bba27ebe0bbd4 /tests/modetest/buffers.c
parent6e8f868e034531b66a215e4e6d978b43b58b92d0 (diff)
modetest: Fix warnings
Enable all standard automake warnings except for -Wpointer-arith (as the test pattern generation code uses void pointer arithmetics) and fix them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tests/modetest/buffers.c')
-rw-r--r--tests/modetest/buffers.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index b75cca70..1ca3be5f 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -999,8 +999,8 @@ fill_pattern(unsigned int format, enum fill_pattern pattern, void *planes[3],
*/
static struct kms_bo *
-allocate_buffer(struct kms_driver *kms,
- int width, int height, int *stride)
+allocate_buffer(struct kms_driver *kms, unsigned int width, unsigned int height,
+ unsigned int *stride)
{
struct kms_bo *bo;
unsigned bo_attribs[] = {
@@ -1034,13 +1034,14 @@ allocate_buffer(struct kms_driver *kms,
struct kms_bo *
create_test_buffer(struct kms_driver *kms, unsigned int format,
- int width, int height, int handles[4],
- int pitches[4], int offsets[4], enum fill_pattern pattern)
+ unsigned int width, unsigned int height,
+ unsigned int handles[4], unsigned int pitches[4],
+ unsigned int offsets[4], enum fill_pattern pattern)
{
struct kms_bo *bo;
- int ret, stride;
- void *planes[3];
+ void *planes[3] = { 0, };
void *virtual;
+ int ret;
bo = allocate_buffer(kms, width, height, &pitches[0]);
if (!bo)