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-06-27 10:01:15 +0200
commit28fff480efe376b9783cdb6a4128036a2fb7c47e (patch)
treef651fe92a2b92415a99d4a5e6f51b1aa1d662f4b /tests/modetest/buffers.c
parent7214db763ab952771b10d8fdf72b902718f35902 (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)