diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-01 14:24:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-01 14:24:59 +0100 |
commit | 4f880deeabc36842b3b4b0d7ad16383db708cd42 (patch) | |
tree | 2e2683f59efff9d3e688aa44aa8c927191cb39cd | |
parent | 1bcc3a3fa00445667adc47d4852237271c7eec0f (diff) |
Compiler warnings
Add an impossible default condition to avoid a compiler warning. And tweak
the code to avoid mismatching signed/unsigned comparisons.
-rw-r--r-- | src/cairo-pdf-surface.c | 1 | ||||
-rw-r--r-- | src/cairo-xml-surface.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 6fa61334..76016872 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -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: diff --git a/src/cairo-xml-surface.c b/src/cairo-xml-surface.c index ec4d3fda..61e8f61a 100644 --- a/src/cairo-xml-surface.c +++ b/src/cairo-xml-surface.c @@ -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); |