[cairo] [PATCH 1/8] Fix warnings about unhandled cases
Pavel Roskin
proski at gnu.org
Sat Aug 12 22:57:47 PDT 2006
From: Pavel Roskin <proski at gnu.org>
It's a good idea to write all valid cases explicitly. Even though
CAIRO_FORMAT_RGB16_565 is obsolete, it's still present in the headers.
Signed-off-by: Pavel Roskin <proski at gnu.org>
---
src/cairo-png.c | 1 +
src/cairo-xlib-surface.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/cairo-png.c b/src/cairo-png.c
index 63966b5..807bd2f 100644
--- a/src/cairo-png.c
+++ b/src/cairo-png.c
@@ -153,6 +153,7 @@ write_png (cairo_surface_t *surface,
depth = 1;
png_color_type = PNG_COLOR_TYPE_GRAY;
break;
+ case CAIRO_FORMAT_RGB16_565:
default:
status = CAIRO_STATUS_NULL_POINTER;
goto BAIL3;
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 4ed29b7..ef23d4a 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -199,6 +199,7 @@ _CAIRO_FORMAT_TO_XRENDER_FORMAT(Display
case CAIRO_FORMAT_RGB24:
pict_format = PictStandardRGB24; break;
case CAIRO_FORMAT_ARGB32:
+ case CAIRO_FORMAT_RGB16_565:
default:
pict_format = PictStandardARGB32; break;
}
@@ -2463,6 +2464,7 @@ _cairo_xlib_surface_add_glyph (Display *
}
break;
case CAIRO_FORMAT_RGB24:
+ case CAIRO_FORMAT_RGB16_565:
default:
ASSERT_NOT_REACHED;
break;
More information about the cairo
mailing list