summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-07-21 17:36:36 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-07-21 17:36:36 +0200
commitf37c63bacdb4384e7dbf8f7bcbde6f8883c2419d (patch)
treec20bb79e96f9807e4f94e49192fd10d35ca205f0
parent58cfeabb90a9bef742df53e2602966a2166e37b9 (diff)
shut up the compiler a bit
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--lib/intel_batchbuffer.c1
-rw-r--r--tests/flip_test.c1
-rw-r--r--tests/gem_ctx_create.c3
-rw-r--r--tests/testdisplay.c12
4 files changed, 8 insertions, 9 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index bcbdf618..724e23d9 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -106,7 +106,6 @@ flush_on_ring_common(struct intel_batchbuffer *batch, int ring)
void
intel_batchbuffer_flush_on_ring(struct intel_batchbuffer *batch, int ring)
{
- int ret;
unsigned int used = flush_on_ring_common(batch, ring);
if (used == 0)
diff --git a/tests/flip_test.c b/tests/flip_test.c
index ab8aacd4..a3287686 100644
--- a/tests/flip_test.c
+++ b/tests/flip_test.c
@@ -270,7 +270,6 @@ static void set_mode(struct test_output *o, int crtc)
drmHandleEvent(drm_fd, &evctx);
}
-out:
fprintf(stdout, "page flipping on crtc %d, connector %d: PASSED\n",
crtc, o->id);
diff --git a/tests/gem_ctx_create.c b/tests/gem_ctx_create.c
index ea29d802..def76d34 100644
--- a/tests/gem_ctx_create.c
+++ b/tests/gem_ctx_create.c
@@ -49,7 +49,8 @@ int main(int argc, char *argv[])
ret = drmIoctl(fd, CONTEXT_CREATE_IOCTL, &create);
if (ret != 0 && (errno == ENODEV || errno == EINVAL)) {
- fprintf(stderr, "Kernel is too old, or contexts not supported\n", strerror(errno));
+ fprintf(stderr, "Kernel is too old, or contexts not supported: %s\n",
+ strerror(errno));
exit(77);
} else if (ret != 0) {
fprintf(stderr, "%s\n", strerror(errno));
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index dc087f89..5b992696 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -335,7 +335,7 @@ paint_color_key(void)
}
static void
-paint_output_info(cairo_t *cr, int width, int height, void *priv)
+paint_output_info(cairo_t *cr, int l_width, int l_height, void *priv)
{
struct connector *c = priv;
cairo_text_extents_t name_extents, mode_extents;
@@ -358,9 +358,9 @@ paint_output_info(cairo_t *cr, int width, int height, void *priv)
cairo_text_extents(cr, mode_buf, &mode_extents);
/* Paint output name */
- x = width / 2;
+ x = l_width / 2;
x -= name_extents.width / 2;
- y = height / 2;
+ y = l_height / 2;
y -= (name_extents.height / 2) - (mode_extents.height / 2) - 10;
cairo_set_font_size(cr, 48);
cairo_move_to(cr, x, y);
@@ -371,10 +371,10 @@ paint_output_info(cairo_t *cr, int width, int height, void *priv)
cairo_fill(cr);
/* Paint mode name */
- x = width / 2;
+ x = l_width / 2;
x -= mode_extents.width / 2;
modes_x = x;
- y = height / 2;
+ y = l_height / 2;
y += (mode_extents.height / 2) + (name_extents.height / 2) + 10;
cairo_set_font_size(cr, 36);
cairo_move_to(cr, x, y);
@@ -424,7 +424,7 @@ paint_output_info(cairo_t *cr, int width, int height, void *priv)
static void
set_mode(struct connector *c)
{
- unsigned int fb_id;
+ unsigned int fb_id = 0;
int j, test_mode_num;
if (depth <= 8)