diff --git a/ChangeLog b/ChangeLog index 02ea233f6..3ba03e231 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-01-21 Christian Biesinger + + * pixman/src/fbpict.c: (detectCPUFeatures): + * src/cairo-paginated-surface.c: + (_cairo_paginated_surface_get_target): + * test/cairo-test.c: (create_image_surface): + + Don't mix declarations and code. This makes the code valid ISO C, + fixes a gcc -pedantic warning, and unbreaks the build with the + compiler Zeta ships with. + 2006-01-20 Carl Worth * src/cairo.h: diff --git a/pixman/src/fbpict.c b/pixman/src/fbpict.c index 69ce332bd..e074174e7 100644 --- a/pixman/src/fbpict.c +++ b/pixman/src/fbpict.c @@ -1,5 +1,5 @@ /* - * $Id: fbpict.c,v 1.7 2005-09-19 02:34:36 vektor Exp $ + * $Id: fbpict.c,v 1.8 2006-01-21 17:39:11 biesi Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -1927,7 +1927,7 @@ enum CPUFeatures { }; static unsigned int detectCPUFeatures(void) { - unsigned int result; + unsigned int result, features; char vendor[13]; vendor[0] = 0; vendor[12] = 0; @@ -1973,7 +1973,7 @@ static unsigned int detectCPUFeatures(void) { : "%eax", "%ecx", "%edx" ); - unsigned int features = 0; + features = 0; if (result) { /* result now contains the standard feature bits */ if (result & (1 << 15)) diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c index 99d7fa934..6317d7083 100644 --- a/src/cairo-paginated-surface.c +++ b/src/cairo-paginated-surface.c @@ -139,10 +139,11 @@ _cairo_surface_is_paginated (cairo_surface_t *surface) cairo_surface_t * _cairo_paginated_surface_get_target (cairo_surface_t *surface) { + cairo_paginated_surface_t *paginated_surface; + assert (_cairo_surface_is_paginated (surface)); - cairo_paginated_surface_t *paginated_surface = - (cairo_paginated_surface_t *) surface; + paginated_surface = (cairo_paginated_surface_t *) surface; return paginated_surface->target; } diff --git a/test/cairo-test.c b/test/cairo-test.c index 58ec000c5..ef19e34fb 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -190,8 +190,8 @@ create_image_surface (cairo_test_t *test, cairo_content_t content, void **closure) { - *closure = NULL; cairo_format_t format; + *closure = NULL; if (content == CAIRO_CONTENT_COLOR_ALPHA) { format = CAIRO_FORMAT_ARGB32;