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.

This commit is contained in:
Christian Biesinger 2006-01-21 09:39:10 +00:00
parent f1fd1cc7a9
commit 2afe78c0c2
4 changed files with 18 additions and 6 deletions

View file

@ -1,3 +1,14 @@
2006-01-21 Christian Biesinger <cbiesinger@web.de>
* 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 <cworth@cworth.org>
* src/cairo.h:

View file

@ -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))

View file

@ -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;
}

View file

@ -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;