diff --git a/src/cairo-color.c b/src/cairo-color.c index 7640bf436..255bd362b 100644 --- a/src/cairo-color.c +++ b/src/cairo-color.c @@ -67,13 +67,14 @@ _cairo_stock_color (cairo_stock_t stock) return &cairo_color_black; case CAIRO_STOCK_TRANSPARENT: return &cairo_color_transparent; - } - - ASSERT_NOT_REACHED; - /* If the user can get here somehow, give a color that indicates a - * problem. */ - return &cairo_color_magenta; + case CAIRO_STOCK_NUM_COLORS: + default: + ASSERT_NOT_REACHED; + /* If the user can get here somehow, give a color that indicates a + * problem. */ + return &cairo_color_magenta; + } } void diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h index 66370e3e8..ca41c1a1f 100644 --- a/src/cairo-types-private.h +++ b/src/cairo-types-private.h @@ -306,7 +306,8 @@ typedef struct _cairo_format_masks { typedef enum { CAIRO_STOCK_WHITE, CAIRO_STOCK_BLACK, - CAIRO_STOCK_TRANSPARENT + CAIRO_STOCK_TRANSPARENT, + CAIRO_STOCK_NUM_COLORS, } cairo_stock_t; typedef enum _cairo_image_transparency {