diff options
author | Benjamin Otte <otte@redhat.com> | 2010-02-10 22:10:23 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-02-10 22:13:33 +0100 |
commit | ed4a30b38311e4ce0730ecd6026432f4a1e8ddf7 (patch) | |
tree | 6aca027781d4522e093939afdc061f3d977eb72c /src/cairo-xcb-surface-core.c | |
parent | 4113e455a317785b83324215a6b0156995665989 (diff) |
build: Add -Wdeclaration-after-statement
... and fix the compile errors from it I get on my build.
It's Cairo style to put declarations before the code, so better warn
about it.
Besides, it eases porting to old compilers like MSVC.
Diffstat (limited to 'src/cairo-xcb-surface-core.c')
-rw-r--r-- | src/cairo-xcb-surface-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-xcb-surface-core.c b/src/cairo-xcb-surface-core.c index 2788bdf2..3cc167ee 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); |