Compiler warnings

Add an impossible default condition to avoid a compiler warning. And tweak
the code to avoid mismatching signed/unsigned comparisons.
This commit is contained in:
Chris Wilson 2009-09-01 14:24:59 +01:00
parent 1bcc3a3fa0
commit 4f880deeab
2 changed files with 5 additions and 4 deletions

View file

@ -1099,6 +1099,7 @@ _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t *surface,
cairo_bool_t interpolate;
switch (filter) {
default:
case CAIRO_FILTER_GOOD:
case CAIRO_FILTER_BEST:
case CAIRO_FILTER_BILINEAR:

View file

@ -266,7 +266,7 @@ _cairo_xml_printf (cairo_xml_t *xml, const char *fmt, ...)
char indent[80];
int len;
len = MIN (xml->indent, sizeof (indent));
len = MIN (xml->indent, ARRAY_LENGTH (indent));
memset (indent, ' ', len);
_cairo_output_stream_write (xml->stream, indent, len);
@ -283,7 +283,7 @@ _cairo_xml_printf_start (cairo_xml_t *xml, const char *fmt, ...)
char indent[80];
int len;
len = MIN (xml->indent, sizeof (indent));
len = MIN (xml->indent, ARRAY_LENGTH (indent));
memset (indent, ' ', len);
_cairo_output_stream_write (xml->stream, indent, len);
@ -535,7 +535,7 @@ static void
_cairo_xml_emit_gradient (cairo_xml_t *xml,
const cairo_gradient_pattern_t *gradient)
{
int i;
unsigned int i;
for (i = 0; i < gradient->n_stops; i++) {
_cairo_xml_printf (xml,
@ -784,7 +784,7 @@ _cairo_xml_surface_stroke (void *abstract_surface,
return status;
if (style->num_dashes) {
int i;
unsigned int i;
_cairo_xml_printf_start (xml, "<dash offset='%f'>",
style->dash_offset);