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@znc.in>
This commit is contained in:
Uli Schlachter 2011-07-09 11:19:49 +02:00
parent 508990af8d
commit cc3e4c6ec9
6 changed files with 8 additions and 0 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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