summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2005-11-04 23:55:38 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2005-11-04 23:55:38 +0000
commitb6942a337fd03b0f24a49f3b7336b9137828c5f4 (patch)
treead95f548fbe6765cdea8bfcae095e42652697e26 /pango
parent933f541030f770b446d95bb0b5b3c85d561a63e5 (diff)
downloadpango-b6942a337fd03b0f24a49f3b7336b9137828c5f4.tar.gz
Turn various gcc warnings off. Adding const, adding static, fully
2005-11-04 Behdad Esfahbod <behdad@gnome.org> * configure.in, examples/argcontext.c examples/cairoview.c, examples/renderdemo.c, examples/renderdemo.h examples/xftview.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-shaper.c, modules/hebrew/hebrew-shaper.h, modules/indic/indic-fc.c, modules/indic/mprefixups.c, modules/syriac/syriac-fc.c, pango/break.c pango/fonts.c, pango/modules.c, pango/pango-coverage.c pango/pango-engine.c, pango/pango-engine.h, pango/pango-fontmap.c, pango/pango-fontset.c, pango/pango-impl-utils.h, pango/pango-layout.c, pango/pango-layout.h, pango/pango-renderer.c, pango/pango-script.c, pango/pango-utils.c, pango/pangocairo-fc.h, pango/pangocairo-font.c, pango/pangocairo-fontmap.c, pango/pangocairo-private.h, pango/pangofc-decoder.c, pango/pangofc-font.c, pango/pangofc-fontmap.c pango/pangoft2.c, pango/pangox-fontcache.c, pango/pangox-fontmap.c pango/pangox.c, pango/pangoxft-font.c, pango/querymodules.c, pango/opentype/ftglue.c, pango/opentype/ftxgpos.c, pango/opentype/ftxopen.c, pango/opentype/pango-ot-buffer.c, pango/opentype/pango-ot-info.c, pango/opentype/pango-ot-ruleset.c, tests/dump-boundaries.c, tests/testboundaries.c, tests/testcolor.c tests/testiter.c, tests/testscript.c: Turn various gcc warnings off. Adding const, adding static, fully initializing structs, match signedness in comparisons. (#317804) * tests/testscript.c, tools/gen-script-for-lang.c: (scripts_for_file): Pass error->message instead of error to fail(), which was wrong. (compare_lang): Fix typo comparing a and a instead of a and b.
Diffstat (limited to 'pango')
-rw-r--r--pango/break.c2
-rw-r--r--pango/fonts.c2
-rw-r--r--pango/modules.c10
-rw-r--r--pango/opentype/ftglue.c2
-rw-r--r--pango/opentype/ftxgpos.c4
-rw-r--r--pango/opentype/ftxopen.c1
-rw-r--r--pango/opentype/pango-ot-buffer.c4
-rw-r--r--pango/opentype/pango-ot-info.c5
-rw-r--r--pango/opentype/pango-ot-ruleset.c5
-rw-r--r--pango/pango-coverage.c2
-rw-r--r--pango/pango-engine.c2
-rw-r--r--pango/pango-engine.h3
-rw-r--r--pango/pango-fontmap.c2
-rw-r--r--pango/pango-fontset.c6
-rw-r--r--pango/pango-impl-utils.h5
-rw-r--r--pango/pango-layout.c2
-rw-r--r--pango/pango-layout.h5
-rw-r--r--pango/pango-renderer.c5
-rw-r--r--pango/pango-script.c4
-rw-r--r--pango/pango-utils.c3
-rw-r--r--pango/pangocairo-fc.h1
-rw-r--r--pango/pangocairo-font.c1
-rw-r--r--pango/pangocairo-fontmap.c1
-rw-r--r--pango/pangocairo-private.h1
-rw-r--r--pango/pangofc-decoder.c6
-rw-r--r--pango/pangofc-font.c2
-rw-r--r--pango/pangofc-fontmap.c2
-rw-r--r--pango/pangoft2.c4
-rw-r--r--pango/pangox-fontcache.c4
-rw-r--r--pango/pangox-fontmap.c14
-rw-r--r--pango/pangox.c3
-rw-r--r--pango/pangoxft-font.c2
-rw-r--r--pango/querymodules.c2
33 files changed, 72 insertions, 45 deletions
diff --git a/pango/break.c b/pango/break.c
index cc123add..8b4ecceb 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1523,7 +1523,7 @@ pango_get_log_attrs (const char *text,
int chars_in_range;
static guint engine_type_id = 0;
static guint render_type_id = 0;
- PangoAnalysis analysis = { NULL, NULL, NULL, 0 };
+ PangoAnalysis analysis = { NULL, NULL, NULL, 0, NULL, NULL };
analysis.level = level;
diff --git a/pango/fonts.c b/pango/fonts.c
index ebea1783..f41a4292 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -867,7 +867,7 @@ parse_size (const char *word,
char *end;
double size = g_ascii_strtod (word, &end);
- if (end - word == wordlen) /* word is a valid float */
+ if ((size_t)(end - word) == wordlen) /* word is a valid float */
{
if (pango_size)
*pango_size = (int)(size * PANGO_SCALE + 0.5);
diff --git a/pango/modules.c b/pango/modules.c
index d0ede877..096d3b87 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -172,7 +172,7 @@ pango_module_load (GTypeModule *module)
pango_module->library = g_module_open (pango_module->path, G_MODULE_BIND_LAZY);
if (!pango_module->library)
{
- g_warning (g_module_error());
+ g_warning ("%s", g_module_error());
return FALSE;
}
@@ -186,7 +186,7 @@ pango_module_load (GTypeModule *module)
!g_module_symbol (pango_module->library, "script_engine_create",
(gpointer *)&pango_module->create))
{
- g_warning (g_module_error());
+ g_warning ("%s", g_module_error());
g_module_close (pango_module->library);
return FALSE;
@@ -545,7 +545,7 @@ map_add_engine (PangoMapInfo *info,
}
script = pair->info.scripts[i].script;
- if (script >= map->entries->len)
+ if ((guint)script >= map->entries->len)
g_array_set_size (map->entries, script + 1);
entry = &g_array_index (map->entries, PangoMapEntry, script);
@@ -635,7 +635,7 @@ pango_map_get_engine (PangoMap *map,
PangoMapEntry *entry = NULL;
PangoMapEntry *common_entry = NULL;
- if (script < map->entries->len)
+ if ((guint)script < map->entries->len)
entry = &g_array_index (map->entries, PangoMapEntry, script);
if (PANGO_SCRIPT_COMMON < map->entries->len)
@@ -692,7 +692,7 @@ pango_map_get_engines (PangoMap *map,
PangoMapEntry *entry = NULL;
PangoMapEntry *common_entry = NULL;
- if (script < map->entries->len)
+ if ((guint)script < map->entries->len)
entry = &g_array_index (map->entries, PangoMapEntry, script);
if (PANGO_SCRIPT_COMMON < map->entries->len)
diff --git a/pango/opentype/ftglue.c b/pango/opentype/ftglue.c
index ebddfa74..bf895ec3 100644
--- a/pango/opentype/ftglue.c
+++ b/pango/opentype/ftglue.c
@@ -138,7 +138,7 @@ ftglue_stream_seek( FT_Stream stream,
if ( stream->read( stream, pos, 0, 0 ) )
error = FT_Err_Invalid_Stream_Operation;
}
- else if ( pos > stream->size )
+ else if ( pos > (FT_Long)stream->size )
error = FT_Err_Invalid_Stream_Operation;
LOG(( "ftglue:stream:seek(%ld) -> %d\n", pos, error ));
diff --git a/pango/opentype/ftxgpos.c b/pango/opentype/ftxgpos.c
index d4743181..ef9e6687 100644
--- a/pango/opentype/ftxgpos.c
+++ b/pango/opentype/ftxgpos.c
@@ -2154,6 +2154,7 @@
base_offset = FILE_Pos();
+ fprintf (stderr, "%04lx base offset (behdad)\n", base_offset);
if ( ACCESS_Frame( 4L ) )
return error;
@@ -2163,6 +2164,9 @@
FORGET_Frame();
+ if (mbp->PosFormat != 1)
+ return TTO_Err_Invalid_SubTable_Format;
+
cur_offset = FILE_Pos();
if ( FILE_Seek( new_offset ) ||
( error = Load_Coverage( &mbp->MarkCoverage, stream ) ) != TT_Err_Ok )
diff --git a/pango/opentype/ftxopen.c b/pango/opentype/ftxopen.c
index 75f66be5..c44e8ef8 100644
--- a/pango/opentype/ftxopen.c
+++ b/pango/opentype/ftxopen.c
@@ -904,6 +904,7 @@
return Load_Coverage2( &c->cf.cf2, stream );
default:
+ fprintf (stderr, "at ftxopen.c:907, got %d (behdad)\n", c->CoverageFormat);
return TTO_Err_Invalid_SubTable_Format;
}
diff --git a/pango/opentype/pango-ot-buffer.c b/pango/opentype/pango-ot-buffer.c
index 057739fd..c69abb0b 100644
--- a/pango/opentype/pango-ot-buffer.c
+++ b/pango/opentype/pango-ot-buffer.c
@@ -211,7 +211,7 @@ pango_ot_buffer_output (PangoOTBuffer *buffer,
FT_Face face;
PangoOTInfo *info;
TTO_GDEF gdef = NULL;
- int i;
+ unsigned int i;
int last_cluster;
face = pango_fc_font_lock_face (buffer->font);
@@ -240,7 +240,7 @@ pango_ot_buffer_output (PangoOTBuffer *buffer,
gdef = pango_ot_info_get_gdef (info);
/* Apply default positioning */
- for (i = 0; i < glyphs->num_glyphs; i++)
+ for (i = 0; i < (unsigned int)glyphs->num_glyphs; i++)
{
if (glyphs->glyphs[i].glyph)
{
diff --git a/pango/opentype/pango-ot-info.c b/pango/opentype/pango-ot-info.c
index 1b6a1807..221b3110 100644
--- a/pango/opentype/pango-ot-info.c
+++ b/pango/opentype/pango-ot-info.c
@@ -52,7 +52,8 @@ pango_ot_info_get_type (void)
NULL, /* class_data */
sizeof (PangoOTInfo),
0, /* n_preallocs */
- NULL /* init */
+ NULL, /* init */
+ NULL, /* value_table */
};
object_type = g_type_register_static (G_TYPE_OBJECT,
@@ -217,7 +218,7 @@ synthesize_class_def (PangoOTInfo *info)
FT_UShort *classes;
FT_ULong charcode;
FT_UInt glyph;
- int i, j;
+ unsigned int i, j;
FT_CharMap old_charmap;
old_charmap = info->face->charmap;
diff --git a/pango/opentype/pango-ot-ruleset.c b/pango/opentype/pango-ot-ruleset.c
index 780814be..bfba00cb 100644
--- a/pango/opentype/pango-ot-ruleset.c
+++ b/pango/opentype/pango-ot-ruleset.c
@@ -55,6 +55,7 @@ pango_ot_ruleset_get_type (void)
sizeof (PangoOTRuleset),
0, /* n_preallocs */
(GInstanceInitFunc)pango_ot_ruleset_init,
+ NULL /* value_table */
};
object_type = g_type_register_static (G_TYPE_OBJECT,
@@ -140,7 +141,7 @@ void
pango_ot_ruleset_substitute (PangoOTRuleset *ruleset,
PangoOTBuffer *buffer)
{
- int i;
+ unsigned int i;
TTO_GSUB gsub = NULL;
@@ -173,7 +174,7 @@ void
pango_ot_ruleset_position (PangoOTRuleset *ruleset,
PangoOTBuffer *buffer)
{
- int i;
+ unsigned int i;
TTO_GPOS gpos = NULL;
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index 62638280..5fd7ccab 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -208,7 +208,7 @@ pango_coverage_set (PangoCoverage *coverage,
g_return_if_fail (coverage != NULL);
g_return_if_fail (index >= 0);
- g_return_if_fail (level >= 0 || level <= 3);
+ g_return_if_fail (level >= 0 && level <= 3);
block_index = index / 256;
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
index d421a1ac..fac90bc1 100644
--- a/pango/pango-engine.c
+++ b/pango/pango-engine.c
@@ -46,7 +46,7 @@ pango_engine_shape_real_covers (PangoEngineShape *engine,
return result;
}
-void
+static void
pango_engine_shape_class_init (PangoEngineShapeClass *class)
{
class->covers = pango_engine_shape_real_covers;
diff --git a/pango/pango-engine.h b/pango/pango-engine.h
index fcac62b8..daf15a3d 100644
--- a/pango/pango-engine.h
+++ b/pango/pango-engine.h
@@ -274,10 +274,11 @@ prefix ## _register_type (GTypeModule *module) \
(GBaseFinalizeFunc) NULL, \
(GClassInitFunc) class_init, \
(GClassFinalizeFunc) NULL, \
- NULL, /* class_data */ \
+ NULL, /* class_data */ \
sizeof (name), \
0, /* n_prelocs */ \
(GInstanceInitFunc) instance_init, \
+ NULL /* value_table */ \
}; \
\
prefix ## _type = g_type_module_register_type (module, parent_type, \
diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c
index 80fcfbd3..c518ae74 100644
--- a/pango/pango-fontmap.c
+++ b/pango/pango-fontmap.c
@@ -111,7 +111,7 @@ pango_font_map_fontset_add_fonts (PangoFontMap *fontmap,
PangoContext *context,
PangoFontsetSimple *fonts,
PangoFontDescription *desc,
- char *family)
+ const char *family)
{
char **aliases;
int n_aliases;
diff --git a/pango/pango-fontset.c b/pango/pango-fontset.c
index f02344a1..542c745d 100644
--- a/pango/pango-fontset.c
+++ b/pango/pango-fontset.c
@@ -274,7 +274,7 @@ pango_fontset_simple_finalize (GObject *object)
{
PangoFontsetSimple *fontset = PANGO_FONTSET_SIMPLE (object);
PangoCoverage *coverage;
- int i;
+ unsigned int i;
for (i = 0; i < fontset->fonts->len; i++)
g_object_unref (g_ptr_array_index(fontset->fonts, i));
@@ -352,7 +352,7 @@ pango_fontset_simple_get_font (PangoFontset *fontset,
PangoFont *font;
PangoCoverage *coverage;
int result = -1;
- int i;
+ unsigned int i;
for (i = 0; i < simple->fonts->len; i++)
{
@@ -387,7 +387,7 @@ pango_fontset_simple_foreach (PangoFontset *fontset,
gpointer data)
{
PangoFontsetSimple *simple = PANGO_FONTSET_SIMPLE (fontset);
- int i;
+ unsigned int i;
for (i = 0; i < simple->fonts->len; i++)
{
diff --git a/pango/pango-impl-utils.h b/pango/pango-impl-utils.h
index fc2e7cf7..498a886c 100644
--- a/pango/pango-impl-utils.h
+++ b/pango/pango-impl-utils.h
@@ -43,10 +43,11 @@ prefix ## _get_type (void) \
(GBaseFinalizeFunc) NULL, \
(GClassInitFunc) class_init, \
(GClassFinalizeFunc) NULL, \
- NULL, /* class_data */ \
+ NULL, /* class_data */ \
sizeof (name), \
0, /* n_prelocs */ \
- (GInstanceInitFunc) instance_init \
+ (GInstanceInitFunc) instance_init, \
+ NULL /* value_table */ \
}; \
\
object_type = g_type_register_static (parent_type, \
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 4ba402fd..24a1fcfb 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3128,7 +3128,7 @@ no_shape_filter_func (PangoAttribute *attribute,
int i;
- for (i = 0; i < G_N_ELEMENTS (no_shape_types); i++)
+ for (i = 0; i < (int)G_N_ELEMENTS (no_shape_types); i++)
if (attribute->klass->type == no_shape_types[i])
return TRUE;
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index 1c099404..06db0244 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -163,6 +163,11 @@ void pango_layout_get_log_attrs (PangoLayout *layout,
void pango_layout_index_to_pos (PangoLayout *layout,
int index_,
PangoRectangle *pos);
+void pango_layout_index_to_line_x (PangoLayout *layout,
+ int index_,
+ gboolean trailing,
+ int *line,
+ int *x_pos);
void pango_layout_get_cursor_pos (PangoLayout *layout,
int index_,
PangoRectangle *strong_pos,
diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c
index 346d435a..c549d682 100644
--- a/pango/pango-renderer.c
+++ b/pango/pango-renderer.c
@@ -300,6 +300,7 @@ add_underline (PangoRenderer *renderer,
new_rect.x = base_x + ink_rect->x;
new_rect.width = ink_rect->width;
new_rect.height = underline_thickness;
+ new_rect.y = base_y;
switch (renderer->underline)
{
@@ -309,10 +310,10 @@ add_underline (PangoRenderer *renderer,
case PANGO_UNDERLINE_SINGLE:
case PANGO_UNDERLINE_DOUBLE:
case PANGO_UNDERLINE_ERROR:
- new_rect.y = base_y - underline_position;
+ new_rect.y -= underline_position;
break;
case PANGO_UNDERLINE_LOW:
- new_rect.y = base_y + ink_rect->y + ink_rect->height + underline_thickness;
+ new_rect.y += ink_rect->y + ink_rect->height + underline_thickness;
break;
}
diff --git a/pango/pango-script.c b/pango/pango-script.c
index 9113d799..06839406 100644
--- a/pango/pango-script.c
+++ b/pango/pango-script.c
@@ -411,7 +411,7 @@ pango_language_includes_script (PangoLanguage *language,
PangoScript script)
{
PangoScriptForLang *script_for_lang;
- int j;
+ unsigned int j;
g_return_val_if_fail (language != NULL, FALSE);
@@ -551,7 +551,7 @@ pango_script_get_sample_language (PangoScript script)
const char *sample_language;
g_return_val_if_fail (script >= 0, NULL);
- g_return_val_if_fail (script < G_N_ELEMENTS (sample_languages), NULL);
+ g_return_val_if_fail ((guint)script < G_N_ELEMENTS (sample_languages), NULL);
sample_language = sample_languages[script];
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index d118b6bc..f6fe3765 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -421,7 +421,7 @@ pango_scan_string (const char **pos, GString *out)
gboolean
pango_scan_int (const char **pos, int *out)
{
- int i = 0;
+ unsigned int i = 0;
char buf[32];
const char *p = *pos;
@@ -1204,6 +1204,7 @@ pango_language_copy (PangoLanguage *language)
{
return language; /* language tags are const */
}
+
static void
pango_language_free (PangoLanguage *language)
{
diff --git a/pango/pangocairo-fc.h b/pango/pangocairo-fc.h
index 7903f03b..9c35aa17 100644
--- a/pango/pangocairo-fc.h
+++ b/pango/pangocairo-fc.h
@@ -49,6 +49,7 @@ PangoFcFont *_pango_cairo_fc_font_new (PangoCairoFcFontMap *cffontmap,
PangoContext *context,
const PangoFontDescription *desc,
FcPattern *pattern);
+FT_Library _pango_cairo_fc_font_map_get_library (PangoCairoFcFontMap *fontmap);
G_END_DECLS
diff --git a/pango/pangocairo-font.c b/pango/pangocairo-font.c
index 7bf700fb..451b9b80 100644
--- a/pango/pangocairo-font.c
+++ b/pango/pangocairo-font.c
@@ -39,6 +39,7 @@ pango_cairo_font_get_type (void)
NULL, /* class_data */
0,
0,
+ NULL,
NULL
};
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c
index 8dd82877..ff0db202 100644
--- a/pango/pangocairo-fontmap.c
+++ b/pango/pangocairo-fontmap.c
@@ -47,6 +47,7 @@ pango_cairo_font_map_get_type (void)
NULL, /* class_data */
0,
0,
+ NULL,
NULL
};
diff --git a/pango/pangocairo-private.h b/pango/pangocairo-private.h
index e7e124b0..d0caea56 100644
--- a/pango/pangocairo-private.h
+++ b/pango/pangocairo-private.h
@@ -75,6 +75,7 @@ GType pango_cairo_renderer_get_type (void);
const cairo_font_options_t *_pango_cairo_context_get_merged_font_options (PangoContext *context);
+
G_END_DECLS
#endif /* __PANGOCAIRO_PRIVATE_H__ */
diff --git a/pango/pangofc-decoder.c b/pango/pangofc-decoder.c
index 766e09e7..29a7e54a 100644
--- a/pango/pangofc-decoder.c
+++ b/pango/pangofc-decoder.c
@@ -24,12 +24,6 @@
G_DEFINE_ABSTRACT_TYPE (PangoFcDecoder, pango_fc_decoder, G_TYPE_OBJECT)
static void
-pango_fc_decoder_init (PangoFcDecoder *decoder);
-
-static void
-pango_fc_decoder_class_init (PangoFcDecoderClass *klass);
-
-static void
pango_fc_decoder_init (PangoFcDecoder *decoder)
{
}
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index ec3d3dcb..3ee9a6c4 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -512,7 +512,7 @@ pango_fc_font_real_get_glyph (PangoFcFont *font,
face = PANGO_FC_FONT_LOCK_FACE (font);
index = FcFreeTypeCharIndex (face, wc);
- if (index > face->num_glyphs)
+ if (index > (FT_UInt)face->num_glyphs)
index = 0;
PANGO_FC_FONT_UNLOCK_FACE (font);
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 4f0e43f0..b11741c7 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1836,6 +1836,7 @@ pango_fc_face_get_type (void)
sizeof (PangoFcFace),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
+ NULL /* value_table */
};
object_type = g_type_register_static (PANGO_TYPE_FONT_FACE,
@@ -1963,6 +1964,7 @@ pango_fc_family_get_type (void)
sizeof (PangoFcFamily),
0, /* n_preallocs */
(GInstanceInitFunc) pango_fc_family_init,
+ NULL /* value_table */
};
object_type = g_type_register_static (PANGO_TYPE_FONT_FAMILY,
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index 75168307..4533907f 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -368,7 +368,9 @@ pango_ft2_font_real_get_unknown_glyph (PangoFcFont *font,
}
static gboolean
-pango_ft2_free_glyph_info_callback (gpointer key, gpointer value, gpointer data)
+pango_ft2_free_glyph_info_callback (gpointer key,
+ gpointer value,
+ gpointer data)
{
PangoFT2Font *font = PANGO_FT2_FONT (data);
PangoFT2GlyphInfo *info = value;
diff --git a/pango/pangox-fontcache.c b/pango/pangox-fontcache.c
index b1e3ae60..2a3ecd05 100644
--- a/pango/pangox-fontcache.c
+++ b/pango/pangox-fontcache.c
@@ -52,7 +52,9 @@ struct _CacheEntry
};
static void
-free_cache_entry (char *xlfd, CacheEntry *entry, PangoXFontCache *cache)
+free_cache_entry (char *xlfd,
+ CacheEntry *entry,
+ PangoXFontCache *cache)
{
g_free (entry->xlfd);
XFreeFont (cache->display, entry->fs);
diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c
index aaa28aad..e108bc71 100644
--- a/pango/pangox-fontmap.c
+++ b/pango/pangox-fontmap.c
@@ -190,6 +190,7 @@ pango_x_font_map_get_type (void)
sizeof (PangoXFontMap),
0, /* n_preallocs */
(GInstanceInitFunc) pango_x_font_map_init,
+ NULL /* value_table */
};
object_type = g_type_register_static (PANGO_TYPE_FONT_MAP,
@@ -380,7 +381,9 @@ pango_x_font_map_finalize (GObject *object)
}
static void
-list_families_foreach (gpointer key, gpointer value, gpointer user_data)
+list_families_foreach (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
GSList **list = user_data;
@@ -527,7 +530,8 @@ pango_x_font_map_load_font (PangoFontMap *fontmap,
static gboolean error_occured;
static int
-ignore_error (Display *d, XErrorEvent *e)
+ignore_error (Display *d,
+ XErrorEvent *e)
{
return 0;
}
@@ -1087,7 +1091,7 @@ pango_x_insert_font (PangoXFontMap *xfontmap,
PangoXFace *xface;
PangoXSizeInfo *size_info;
char *identifier;
- int i;
+ unsigned int i;
/* First insert the XLFD into the list of XLFDs for the "identifier" - which
* is the 2-4th fields of the XLFD
@@ -1205,7 +1209,7 @@ pango_x_insert_font (PangoXFontMap *xfontmap,
/* Compare the tail of a to b */
static gboolean
-match_end (char *a, char *b)
+match_end (const char *a, const char *b)
{
size_t len_a = strlen (a);
size_t len_b = strlen (b);
@@ -1502,6 +1506,7 @@ pango_x_face_get_type (void)
sizeof (PangoXFace),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
+ NULL /* value_table */
};
object_type = g_type_register_static (PANGO_TYPE_FONT_FACE,
@@ -1660,6 +1665,7 @@ pango_x_family_get_type (void)
sizeof (PangoXFamily),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
+ NULL /* value_table */
};
object_type = g_type_register_static (PANGO_TYPE_FONT_FAMILY,
diff --git a/pango/pangox.c b/pango/pangox.c
index fcfada08..7fec7542 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -243,6 +243,7 @@ pango_x_font_get_type (void)
sizeof (PangoXFont),
0, /* n_preallocs */
(GInstanceInitFunc) pango_x_font_init,
+ NULL /* value_table */
};
object_type = g_type_register_static (PANGO_TYPE_FONT,
@@ -948,7 +949,7 @@ pango_x_font_get_font_map (PangoFont *font)
/* Compare the tail of a to b */
static gboolean
-match_end (char *a, char *b)
+match_end (const char *a, const char *b)
{
size_t len_a = strlen (a);
size_t len_b = strlen (b);
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c
index f4726f59..5146ef29 100644
--- a/pango/pangoxft-font.c
+++ b/pango/pangoxft-font.c
@@ -358,7 +358,7 @@ load_fallback_font (PangoXftFont *xfont)
_pango_xft_font_map_get_info (fcfont->fontmap, &display, &screen);
size_is_absolute = pango_font_description_get_size_is_absolute (fcfont->description);
- size = (double)pango_font_description_get_size (fcfont->description) / PANGO_SCALE;
+ size = pango_font_description_get_size (fcfont->description) / PANGO_SCALE;
xft_font = XftFontOpen (display, screen,
FC_FAMILY, FcTypeString, "sans",
diff --git a/pango/querymodules.c b/pango/querymodules.c
index 8c5553d1..fc0fbe4b 100644
--- a/pango/querymodules.c
+++ b/pango/querymodules.c
@@ -120,7 +120,7 @@ script_from_string (PangoScript script)
return value->value_nick;
}
-void
+static void
query_module (const char *dir, const char *name)
{
void (*list) (PangoEngineInfo **engines, gint *n_engines);