Fix some trivial syntax warnings for -ansi.

gcc -ansi -pedantic gives a few syntax warnings, principally for use of
'//' comments and a comma at the end of enumerators. Apply these
corrections as they are trivial.
This commit is contained in:
Chris Wilson 2007-10-09 23:12:52 +01:00
parent 7e6ac74de1
commit b8d7d62b08
6 changed files with 19 additions and 15 deletions

View file

@ -702,7 +702,7 @@ MAYBE_WARN="-Wall -Wextra \
-Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
-Wdeclaration-after-statement -Wold-style-definition \
-Wno-missing-field-initializers -Wno-unused-parameter \
-Wno-attributes"
-Wno-attributes -Wno-long-long -Winline"
# invalidate cached value if MAYBE_WARN has changed

View file

@ -68,7 +68,7 @@
#define DFB_SHOW_GLYPHS 1
D_DEBUG_DOMAIN (Cairo_DirectFB, "Cairo/DirectFB", "Cairo DirectFB backend");
D_DEBUG_DOMAIN (Cairo_DirectFB, "Cairo/DirectFB", "Cairo DirectFB backend")
/*****************************************************************************/
@ -530,12 +530,12 @@ _cairo_directfb_surface_release_dest_image (void *abstract_surf
buffer->Unlock (buffer);
if (surface->dfbsurface != buffer) {
DFBRegion region = { x1:interest_rect->x, y1:interest_rect->y,
x2:interest_rect->x+interest_rect->width-1,
y2:interest_rect->y+interest_rect->height-1 };
DFBRegion region = { .x1 = interest_rect->x, .y1 = interest_rect->y,
.x2 = interest_rect->x+interest_rect->width-1,
.y2 = interest_rect->y+interest_rect->height-1 };
surface->dfbsurface->SetClip (surface->dfbsurface, &region);
//surface->dfbsurface->SetBlittingFlags (surface->dfbsurface,
// DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_COLORIZE);
/* surface->dfbsurface->SetBlittingFlags (surface->dfbsurface,
DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_COLORIZE); */
surface->dfbsurface->Blit (surface->dfbsurface,buffer,NULL,
image_rect->x,image_rect->y);
buffer->Release (buffer);
@ -666,7 +666,7 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst,
if (sblend == DSBF_ONE) {
flags |= DSBLIT_BLEND_ALPHACHANNEL;
sblend = DSBF_SRCALPHA;
//dblend = DSBF_INVSRCALPHA;
/* dblend = DSBF_INVSRCALPHA; */
}
}
@ -1227,7 +1227,7 @@ _directfb_allocate_font_cache (IDirectFB *dfb, int width, int height)
return NULL;
}
//dfb->AddRef (dfb);
/* dfb->AddRef (dfb); */
cache->dfb = dfb;
cache->width = width;

View file

@ -61,7 +61,7 @@ typedef enum {
typedef enum {
CAIRO_META_REGION_ALL,
CAIRO_META_REGION_NATIVE,
CAIRO_META_REGION_IMAGE_FALLBACK,
CAIRO_META_REGION_IMAGE_FALLBACK
} cairo_meta_region_type_t;
typedef struct _cairo_command_header {

View file

@ -41,7 +41,7 @@
typedef enum {
CAIRO_CHARSTRING_TYPE1,
CAIRO_CHARSTRING_TYPE2,
CAIRO_CHARSTRING_TYPE2
} cairo_charstring_type_t;
typedef struct _cairo_type1_font {

View file

@ -54,7 +54,6 @@ typedef struct _cairo_paginated_surface_backend cairo_paginated_surface_backend_
typedef struct _cairo_scaled_font_backend cairo_scaled_font_backend_t;
typedef struct _cairo_font_face_backend cairo_font_face_backend_t;
typedef struct _cairo_xlib_screen_info cairo_xlib_screen_info_t;
typedef enum _cairo_paginated_mode cairo_paginated_mode_t;
typedef cairo_array_t cairo_user_data_array_t;
/**
@ -122,10 +121,10 @@ struct _cairo_cache {
int freeze_count;
};
enum _cairo_paginated_mode {
typedef enum _cairo_paginated_mode {
CAIRO_PAGINATED_MODE_ANALYZE, /* analyze page regions */
CAIRO_PAGINATED_MODE_RENDER /* render page contents */
};
} cairo_paginated_mode_t;
/* Sure wish C had a real enum type so that this would be distinct
from cairo_status_t. Oh well, without that, I'll use this bogus 1000
@ -137,7 +136,7 @@ typedef enum _cairo_int_status {
CAIRO_INT_STATUS_CACHE_EMPTY,
CAIRO_INT_STATUS_FLATTEN_TRANSPARENCY,
CAIRO_INT_STATUS_IMAGE_FALLBACK,
CAIRO_INT_STATUS_ANALYZE_META_SURFACE_PATTERN,
CAIRO_INT_STATUS_ANALYZE_META_SURFACE_PATTERN
} cairo_int_status_t;
typedef enum _cairo_internal_surface_type {

View file

@ -74,6 +74,11 @@
#define inline __inline
#endif
#ifdef __STRICT_ANSI__
#undef inline
#define inline __inline__
#endif
CAIRO_BEGIN_DECLS
#undef MIN