diff options
-rw-r--r-- | build/configure.ac.warnings | 2 | ||||
-rw-r--r-- | src/cairo-gl-shaders.c | 8 | ||||
-rw-r--r-- | src/cairo-gl-surface.c | 3 | ||||
-rw-r--r-- | src/cairo-xcb-surface-core.c | 3 |
4 files changed, 9 insertions, 7 deletions
diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings index 212f8a067..5b561e14e 100644 --- a/build/configure.ac.warnings +++ b/build/configure.ac.warnings @@ -9,7 +9,7 @@ dnl MAYBE_WARN in an ignorable way (like adding whitespace) # cast image data from uint8_t to uin32_t. MAYBE_WARN="-Wall -Wextra \ --Wold-style-definition \ +-Wold-style-definition -Wdeclaration-after-statement \ -Wmissing-declarations -Werror-implicit-function-declaration \ -Wnested-externs -Wpointer-arith -Wwrite-strings \ -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes \ diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c index 582eb4847..e2797d580 100644 --- a/src/cairo-gl-shaders.c +++ b/src/cairo-gl-shaders.c @@ -292,14 +292,14 @@ static cairo_status_t bind_matrix_to_shader_arb (GLuint program, const char *name, cairo_matrix_t* m) { GLint location = glGetUniformLocationARB (program, name); - if (location == -1) - return CAIRO_INT_STATUS_UNSUPPORTED; float gl_m[16] = { m->xx, m->xy, 0, m->x0, m->yx, m->yy, 0, m->y0, 0, 0, 1, 0, 0, 0, 0, 1 }; + if (location == -1) + return CAIRO_INT_STATUS_UNSUPPORTED; glUniformMatrix4fvARB (location, 1, GL_TRUE, gl_m); return CAIRO_STATUS_SUCCESS; } @@ -466,14 +466,14 @@ static cairo_status_t bind_matrix_to_shader_core_2_0 (GLuint program, const char *name, cairo_matrix_t* m) { GLint location = glGetUniformLocation (program, name); - if (location == -1) - return CAIRO_INT_STATUS_UNSUPPORTED; float gl_m[16] = { m->xx, m->xy, 0, m->x0, m->yx, m->yy, 0, m->y0, 0, 0, 1, 0, 0, 0, 0, 1 }; + if (location == -1) + return CAIRO_INT_STATUS_UNSUPPORTED; glUniformMatrix4fv (location, 1, GL_TRUE, gl_m); return CAIRO_STATUS_SUCCESS; } diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index c860f3043..9c7c28ef5 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -1311,9 +1311,10 @@ _cairo_gl_operand_init (cairo_gl_composite_operand_t *operand, int dst_x, int dst_y, int width, int height) { - operand->pattern = pattern; cairo_status_t status; + operand->pattern = pattern; + switch (pattern->type) { case CAIRO_PATTERN_TYPE_SOLID: return _cairo_gl_solid_operand_init (operand, diff --git a/src/cairo-xcb-surface-core.c b/src/cairo-xcb-surface-core.c index 2788bdf2d..3cc167eea 100644 --- a/src/cairo-xcb-surface-core.c +++ b/src/cairo-xcb-surface-core.c @@ -506,9 +506,10 @@ _cairo_xcb_surface_core_copy_boxes (cairo_xcb_surface_t *dst, _cairo_xcb_connection_change_gc (dst->connection, gc, mask, values); for (chunk = &boxes->chunks; chunk != NULL; chunk = chunk->next) { - xcb_rects = (xcb_rectangle_t *) chunk->base; int i; + xcb_rects = (xcb_rectangle_t *) chunk->base; + for (i = 0; i < chunk->count; i++) { int x1 = _cairo_fixed_integer_round (chunk->base[i].p1.x); int x2 = _cairo_fixed_integer_round (chunk->base[i].p2.x); |