[cairo-commit] src/cairo-device.c src/cairo-misc.c src/cairo-region.c src/cairo-spans.c src/cairo-surface.c util/cairo-trace
Uli Schlachter
psychon at kemper.freedesktop.org
Sat Jul 9 02:21:36 PDT 2011
src/cairo-device.c | 1 +
src/cairo-misc.c | 2 ++
src/cairo-region.c | 1 +
src/cairo-spans.c | 2 ++
src/cairo-surface.c | 1 +
util/cairo-trace/trace.c | 1 +
6 files changed, 8 insertions(+)
New commits:
commit cc3e4c6ec96c3319abaae889198f0fbab8e1f90d
Author: Uli Schlachter <psychon at znc.in>
Date: Sat Jul 9 11:19:49 2011 +0200
Handle CAIRO_STATUS_DEVICE_FINISHED in switches
Fixes all warnings that looked like this:
warning: enumeration value 'CAIRO_STATUS_DEVICE_FINISHED' not handled in switch
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-device.c b/src/cairo-device.c
index b6dde63..c640547 100644
--- a/src/cairo-device.c
+++ b/src/cairo-device.c
@@ -157,6 +157,7 @@ _cairo_device_create_in_error (cairo_status_t status)
case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED:
case CAIRO_STATUS_INVALID_CONTENT:
case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION:
+ case CAIRO_STATUS_DEVICE_FINISHED:
default:
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
return (cairo_device_t *) &_nil_device;
diff --git a/src/cairo-misc.c b/src/cairo-misc.c
index 87cabcb..926d3aa 100644
--- a/src/cairo-misc.c
+++ b/src/cairo-misc.c
@@ -152,6 +152,8 @@ cairo_status_to_string (cairo_status_t status)
return "an operation to the device caused an unspecified error";
case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION:
return "invalid operation during mesh pattern construction";
+ case CAIRO_STATUS_DEVICE_FINISHED:
+ return "the target device has been finished";
default:
case CAIRO_STATUS_LAST_STATUS:
return "<unknown error status>";
diff --git a/src/cairo-region.c b/src/cairo-region.c
index 4c57ef1..5e29bfe 100644
--- a/src/cairo-region.c
+++ b/src/cairo-region.c
@@ -105,6 +105,7 @@ _cairo_region_create_in_error (cairo_status_t status)
case CAIRO_STATUS_INVALID_WEIGHT:
case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED:
case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION:
+ case CAIRO_STATUS_DEVICE_FINISHED:
default:
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
return (cairo_region_t *) &_cairo_region_nil;
diff --git a/src/cairo-spans.c b/src/cairo-spans.c
index bffbdeb..09af57a 100644
--- a/src/cairo-spans.c
+++ b/src/cairo-spans.c
@@ -205,6 +205,7 @@ _cairo_scan_converter_create_in_error (cairo_status_t status)
case CAIRO_STATUS_DEVICE_TYPE_MISMATCH: RETURN_NIL;
case CAIRO_STATUS_DEVICE_ERROR: RETURN_NIL;
case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: RETURN_NIL;
+ case CAIRO_STATUS_DEVICE_FINISHED: RETURN_NIL;
default:
break;
}
@@ -316,6 +317,7 @@ _cairo_span_renderer_create_in_error (cairo_status_t status)
case CAIRO_STATUS_DEVICE_TYPE_MISMATCH: RETURN_NIL;
case CAIRO_STATUS_DEVICE_ERROR: RETURN_NIL;
case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: RETURN_NIL;
+ case CAIRO_STATUS_DEVICE_FINISHED: RETURN_NIL;
default:
break;
}
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 695a63b..98903dc 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -3021,6 +3021,7 @@ _cairo_surface_create_in_error (cairo_status_t status)
case CAIRO_STATUS_INVALID_WEIGHT:
case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED:
case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION:
+ case CAIRO_STATUS_DEVICE_FINISHED:
default:
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
return (cairo_surface_t *) &_cairo_surface_nil;
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index 95fe35f..b8fd04e 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -1506,6 +1506,7 @@ _status_to_string (cairo_status_t status)
f(DEVICE_TYPE_MISMATCH);
f(DEVICE_ERROR);
f(INVALID_MESH_CONSTRUCTION);
+ f(DEVICE_FINISHED);
case CAIRO_STATUS_LAST_STATUS:
break;
}
More information about the cairo-commit
mailing list