summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-08-07 15:18:38 -0700
committerCarl Worth <cworth@cworth.org>2006-08-07 15:22:49 -0700
commit20c3ff96de05365ee65301ccd3c43e7bcb19f49b (patch)
treeaeeb60c5e74033ebb19b799ad4ec7f58a248fa31 /src
parent959b85e98c8a0f546c9117da83f84c99ed00370f (diff)
Fix some signed/unsigned comparison warnings that cropped up during the warnings-cleanup branch
Diffstat (limited to 'src')
-rw-r--r--src/cairo-meta-surface-private.h2
-rw-r--r--src/cairo-pdf-surface.c6
-rw-r--r--src/cairo-ps-surface.c5
-rw-r--r--src/cairo-scaled-font-subsets-private.h2
-rw-r--r--src/cairo-svg-surface.c2
-rw-r--r--src/cairo-truetype-subset.c14
-rw-r--r--src/cairo-type1-subset.c4
7 files changed, 17 insertions, 18 deletions
diff --git a/src/cairo-meta-surface-private.h b/src/cairo-meta-surface-private.h
index 24b1b470..3f2d390c 100644
--- a/src/cairo-meta-surface-private.h
+++ b/src/cairo-meta-surface-private.h
@@ -97,7 +97,7 @@ typedef struct _cairo_command_show_glyphs {
cairo_operator_t op;
cairo_pattern_union_t source;
cairo_glyph_t *glyphs;
- int num_glyphs;
+ unsigned int num_glyphs;
cairo_scaled_font_t *scaled_font;
} cairo_command_show_glyphs_t;
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index ed8d084d..132c604d 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -1601,7 +1601,7 @@ _cairo_pdf_surface_emit_type1_font_subset (cairo_pdf_surface_t *surface,
cairo_type1_subset_t subset;
unsigned long length, compressed_length;
char *compressed;
- int i;
+ unsigned int i;
char name[64];
snprintf (name, sizeof name, "CairoFont-%d-%d",
@@ -1711,7 +1711,7 @@ _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t *surface,
cairo_truetype_subset_t subset;
unsigned long compressed_length;
char *compressed;
- int i;
+ unsigned int i;
status = _cairo_truetype_subset_init (&subset, font_subset);
if (status)
@@ -1944,7 +1944,7 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t *surface,
cairo_pdf_resource_t *glyphs, encoding, char_procs, subset_resource;
cairo_pdf_font_t font;
cairo_matrix_t matrix;
- int i;
+ unsigned int i;
glyphs = malloc (font_subset->num_glyphs * sizeof (cairo_pdf_resource_t));
if (glyphs == NULL) {
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index f93643de..e0b611de 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -425,8 +425,7 @@ _cairo_ps_surface_emit_truetype_font_subset (cairo_ps_surface_t *surface,
{
cairo_truetype_subset_t subset;
cairo_status_t status;
- int i;
- unsigned int begin, end;
+ unsigned int i, begin, end;
status = _cairo_truetype_subset_init (&subset, font_subset);
if (status)
@@ -628,7 +627,7 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t *surface,
{
cairo_matrix_t matrix;
- int i;
+ unsigned int i;
_cairo_output_stream_printf (surface->final_stream,
"%% _cairo_ps_surface_emit_type3_font_subset\n");
diff --git a/src/cairo-scaled-font-subsets-private.h b/src/cairo-scaled-font-subsets-private.h
index 08c89961..c41e477c 100644
--- a/src/cairo-scaled-font-subsets-private.h
+++ b/src/cairo-scaled-font-subsets-private.h
@@ -50,7 +50,7 @@ typedef struct _cairo_scaled_font_subset {
* Value of glyphs array is scaled_font_glyph_index.
*/
unsigned long *glyphs;
- int num_glyphs;
+ unsigned int num_glyphs;
} cairo_scaled_font_subset_t;
/**
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 653c9c48..448ddfed 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -625,7 +625,7 @@ _cairo_svg_document_emit_font_subset (cairo_scaled_font_subset_t *font_subset,
void *closure)
{
cairo_svg_document_t *document = closure;
- int i;
+ unsigned int i;
for (i = 0; i < font_subset->num_glyphs; i++) {
_cairo_svg_document_emit_glyph (document,
diff --git a/src/cairo-truetype-subset.c b/src/cairo-truetype-subset.c
index 47690277..5a3b2e16 100644
--- a/src/cairo-truetype-subset.c
+++ b/src/cairo-truetype-subset.c
@@ -51,7 +51,7 @@ typedef struct _cairo_truetype_font {
struct {
char *base_font;
- int num_glyphs;
+ unsigned int num_glyphs;
int *widths;
long x_min, y_min, x_max, y_max;
long ascent, descent;
@@ -445,7 +445,7 @@ static int
cairo_truetype_font_write_cmap_table (cairo_truetype_font_t *font,
unsigned long tag)
{
- int i;
+ unsigned int i;
cairo_truetype_font_write_be16 (font, 0);
cairo_truetype_font_write_be16 (font, 1);
@@ -549,7 +549,7 @@ cairo_truetype_font_write_glyf_table (cairo_truetype_font_t *font,
tt_head_t header;
unsigned long begin, end;
unsigned char *buffer;
- int i;
+ unsigned int i;
union {
unsigned char *bytes;
uint16_t *short_offsets;
@@ -648,7 +648,7 @@ cairo_truetype_font_write_hmtx_table (cairo_truetype_font_t *font,
unsigned long long_entry_size;
unsigned long short_entry_size;
short *p;
- int i;
+ unsigned int i;
tt_hhea_t hhea;
int num_hmetrics;
@@ -691,7 +691,7 @@ static int
cairo_truetype_font_write_loca_table (cairo_truetype_font_t *font,
unsigned long tag)
{
- int i;
+ unsigned int i;
tt_head_t header;
unsigned long size;
@@ -832,7 +832,7 @@ cairo_truetype_font_generate (cairo_truetype_font_t *font,
{
unsigned long start, end, next;
uint32_t checksum, *checksum_location;
- int i;
+ unsigned int i;
if (cairo_truetype_font_write_offset_table (font))
goto fail;
@@ -891,7 +891,7 @@ _cairo_truetype_subset_init (cairo_truetype_subset_t *truetype_subset,
const char *data = NULL; /* squelch bogus compiler warning */
unsigned long length = 0; /* squelch bogus compiler warning */
unsigned long parent_glyph, offsets_length;
- int i;
+ unsigned int i;
const unsigned long *string_offsets = NULL;
unsigned long num_strings = 0;
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 1daa2f47..26ac97a4 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -53,7 +53,7 @@ typedef struct _cairo_type1_font_subset {
cairo_unscaled_font_t *unscaled_font;
unsigned int font_id;
char *base_font;
- int num_glyphs;
+ unsigned int num_glyphs;
long x_min, y_min, x_max, y_max;
long ascent, descent;
@@ -958,7 +958,7 @@ _cairo_type1_subset_init (cairo_type1_subset_t *type1_subset,
cairo_type1_font_subset_t *font;
cairo_status_t status;
unsigned long parent_glyph, length;
- int i;
+ unsigned int i;
cairo_unscaled_font_t *unscaled_font;
/* XXX: Need to fix this to work with a general cairo_unscaled_font_t. */