summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog29
-rw-r--r--pango/modules.c11
-rw-r--r--pango/opentype/harfbuzz-gpos.c2
-rw-r--r--pango/pango-bidi-type.c1
-rw-r--r--pango/pango-coverage.c4
-rw-r--r--pango/pango-engine.c14
-rw-r--r--pango/pango-fontmap.c2
-rw-r--r--pango/pango-ot-ruleset.c4
-rw-r--r--pango/pangofc-decoder.c4
-rw-r--r--pango/pangofc-font.c4
-rw-r--r--pango/pangofc-fontmap.c29
-rw-r--r--pango/pangoft2-fontmap.c2
-rw-r--r--pango/pangoft2-render.c4
-rw-r--r--pango/pangoft2.c6
14 files changed, 73 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c4ec513..4e5af33f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,34 @@
2008-12-25 Behdad Esfahbod <behdad@gnome.org>
+ * pango/modules.c (pango_module_load), (script_info_free):
+ * pango/opentype/harfbuzz-gpos.c (HB_Load_GPOS_Table):
+ * pango/pango-bidi-type.c:
+ * pango/pango-coverage.c (pango_coverage_ref),
+ (pango_coverage_unref):
+ * pango/pango-engine.c (pango_engine_shape_real_covers),
+ (fallback_engine_shape), (fallback_engine_covers):
+ * pango/pango-fontmap.c (pango_font_map_init):
+ * pango/pango-ot-ruleset.c (pango_ot_ruleset_finalize),
+ (pango_ot_ruleset_new):
+ * pango/pangofc-decoder.c (pango_fc_decoder_init),
+ (pango_fc_decoder_class_init):
+ * pango/pangofc-font.c (pango_fc_font_find_shaper),
+ (pango_fc_font_get_coverage):
+ * pango/pangofc-fontmap.c (pango_fc_font_map_list_families),
+ (pango_fc_make_pattern), (pango_fc_font_map_get_patterns),
+ (get_first_font), (_pango_fc_font_map_get_coverage),
+ (cleanup_font), (pango_fc_font_description_from_pattern),
+ (pango_fc_face_list_sizes), (pango_fc_family_list_faces):
+ * pango/pangoft2-fontmap.c (pango_ft2_font_map_get_resolution):
+ * pango/pangoft2-render.c (pango_ft2_renderer_init),
+ (pango_ft2_renderer_draw_trapezoid):
+ * pango/pangoft2.c (pango_ft2_font_get_face),
+ (pango_ft2_font_real_unlock_face),
+ (pango_ft2_free_glyph_info_callback):
+ Fix more warnings.
+
+2008-12-25 Behdad Esfahbod <behdad@gnome.org>
+
* pango/break.c (pango_default_break):
* pango/fonts.c (find_field_any), (pango_font_class_init),
(pango_font_init), (pango_font_metrics_ref),
diff --git a/pango/modules.c b/pango/modules.c
index a93dc090..16a04eb2 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -178,13 +178,13 @@ pango_module_load (GTypeModule *module)
/* extract symbols from the lib */
if (!g_module_symbol (pango_module->library, "script_engine_init",
- (gpointer *)&pango_module->init) ||
+ (gpointer *)(void *)&pango_module->init) ||
!g_module_symbol (pango_module->library, "script_engine_exit",
- (gpointer *)&pango_module->exit) ||
+ (gpointer *)(void *)&pango_module->exit) ||
!g_module_symbol (pango_module->library, "script_engine_list",
- (gpointer *)&pango_module->list) ||
+ (gpointer *)(void *)&pango_module->list) ||
!g_module_symbol (pango_module->library, "script_engine_create",
- (gpointer *)&pango_module->create))
+ (gpointer *)(void *)&pango_module->create))
{
g_warning ("%s", g_module_error());
g_module_close (pango_module->library);
@@ -373,7 +373,8 @@ script_from_string (const char *str)
}
static void
-script_info_free (PangoEngineScriptInfo *script_info, gpointer data)
+script_info_free (PangoEngineScriptInfo *script_info,
+ gpointer data G_GNUC_UNUSED)
{
g_slice_free (PangoEngineScriptInfo, script_info);
}
diff --git a/pango/opentype/harfbuzz-gpos.c b/pango/opentype/harfbuzz-gpos.c
index 1e83711e..02cbd202 100644
--- a/pango/opentype/harfbuzz-gpos.c
+++ b/pango/opentype/harfbuzz-gpos.c
@@ -96,7 +96,7 @@ HB_Error HB_Load_GPOS_Table( HB_Font font,
if ( ALLOC ( gpos, sizeof( *gpos ) ) )
return error;
- gpos->gfunc = FT_Load_Glyph;
+ gpos->gfunc = (HB_GlyphFunction) FT_Load_Glyph;
gpos->mmfunc = default_mmfunc;
/* skip version */
diff --git a/pango/pango-bidi-type.c b/pango/pango-bidi-type.c
index 17e9fc83..990c4d2b 100644
--- a/pango/pango-bidi-type.c
+++ b/pango/pango-bidi-type.c
@@ -24,6 +24,7 @@
#include <string.h>
#include "pango-bidi-type.h"
+#include "pango-utils.h"
#include "mini-fribidi/fribidi.h"
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index 77559d0a..4e47c244 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -122,7 +122,7 @@ pango_coverage_ref (PangoCoverage *coverage)
{
g_return_val_if_fail (coverage != NULL, NULL);
- g_atomic_int_inc (&coverage->ref_count);
+ g_atomic_int_inc ((int *) &coverage->ref_count);
return coverage;
}
@@ -142,7 +142,7 @@ pango_coverage_unref (PangoCoverage *coverage)
g_return_if_fail (coverage != NULL);
g_return_if_fail (coverage->ref_count > 0);
- if (g_atomic_int_dec_and_test (&coverage->ref_count))
+ if (g_atomic_int_dec_and_test ((int *) &coverage->ref_count))
{
for (i=0; i<coverage->n_blocks; i++)
g_free (coverage->blocks[i].data);
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
index 96349316..2891762a 100644
--- a/pango/pango-engine.c
+++ b/pango/pango-engine.c
@@ -34,7 +34,7 @@ PANGO_DEFINE_TYPE_ABSTRACT (PangoEngineLang, pango_engine_lang,
PANGO_TYPE_ENGINE)
static PangoCoverageLevel
-pango_engine_shape_real_covers (PangoEngineShape *engine,
+pango_engine_shape_real_covers (PangoEngineShape *engine G_GNUC_UNUSED,
PangoFont *font,
PangoLanguage *language,
gunichar wc)
@@ -95,8 +95,8 @@ typedef PangoEngineShape PangoFallbackEngine;
typedef PangoEngineShapeClass PangoFallbackEngineClass;
static void
-fallback_engine_shape (PangoEngineShape *engine,
- PangoFont *font,
+fallback_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
+ PangoFont *font G_GNUC_UNUSED,
const char *text,
gint length,
const PangoAnalysis *analysis,
@@ -143,10 +143,10 @@ fallback_engine_shape (PangoEngineShape *engine,
}
static PangoCoverageLevel
-fallback_engine_covers (PangoEngineShape *engine,
- PangoFont *font,
- PangoLanguage *lang,
- gunichar wc)
+fallback_engine_covers (PangoEngineShape *engine G_GNUC_UNUSED,
+ PangoFont *font G_GNUC_UNUSED,
+ PangoLanguage *lang G_GNUC_UNUSED,
+ gunichar wc G_GNUC_UNUSED)
{
return PANGO_COVERAGE_NONE;
}
diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c
index e9cbbe13..a2b1452d 100644
--- a/pango/pango-fontmap.c
+++ b/pango/pango-fontmap.c
@@ -39,7 +39,7 @@ pango_font_map_class_init (PangoFontMapClass *class)
}
static void
-pango_font_map_init (PangoFontMap *fontmap)
+pango_font_map_init (PangoFontMap *fontmap G_GNUC_UNUSED)
{
}
diff --git a/pango/pango-ot-ruleset.c b/pango/pango-ot-ruleset.c
index 5be304fa..2d0492b8 100644
--- a/pango/pango-ot-ruleset.c
+++ b/pango/pango-ot-ruleset.c
@@ -93,7 +93,7 @@ pango_ot_ruleset_finalize (GObject *object)
g_array_free (ruleset->rules, TRUE);
if (ruleset->info)
- g_object_remove_weak_pointer (G_OBJECT (ruleset->info), (gpointer *) &ruleset->info);
+ g_object_remove_weak_pointer (G_OBJECT (ruleset->info), (gpointer *)(void *)&ruleset->info);
parent_class->finalize (object);
}
@@ -175,7 +175,7 @@ pango_ot_ruleset_new (PangoOTInfo *info)
ruleset = g_object_new (PANGO_TYPE_OT_RULESET, NULL);
ruleset->info = info;
- g_object_add_weak_pointer (G_OBJECT (ruleset->info), (gpointer *) &ruleset->info);
+ g_object_add_weak_pointer (G_OBJECT (ruleset->info), (gpointer *)(void*)&ruleset->info);
return ruleset;
}
diff --git a/pango/pangofc-decoder.c b/pango/pangofc-decoder.c
index 5f0c0bfc..09a4eed0 100644
--- a/pango/pangofc-decoder.c
+++ b/pango/pangofc-decoder.c
@@ -25,12 +25,12 @@
G_DEFINE_ABSTRACT_TYPE (PangoFcDecoder, pango_fc_decoder, G_TYPE_OBJECT)
static void
-pango_fc_decoder_init (PangoFcDecoder *decoder)
+pango_fc_decoder_init (PangoFcDecoder *decoder G_GNUC_UNUSED)
{
}
static void
-pango_fc_decoder_class_init (PangoFcDecoderClass *klass)
+pango_fc_decoder_class_init (PangoFcDecoderClass *klass G_GNUC_UNUSED)
{
}
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index 8a5b9ac8..d5f2d57f 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -283,7 +283,7 @@ pango_fc_get_shaper_map (PangoLanguage *language)
}
static PangoEngineShape *
-pango_fc_font_find_shaper (PangoFont *font,
+pango_fc_font_find_shaper (PangoFont *font G_GNUC_UNUSED,
PangoLanguage *language,
guint32 ch)
{
@@ -297,7 +297,7 @@ pango_fc_font_find_shaper (PangoFont *font,
static PangoCoverage *
pango_fc_font_get_coverage (PangoFont *font,
- PangoLanguage *language)
+ PangoLanguage *language G_GNUC_UNUSED)
{
PangoFcFont *fcfont = (PangoFcFont *)font;
PangoFcFontPrivate *priv = fcfont->priv;
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 5c5dbe58..cfb3a7e4 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -675,11 +675,11 @@ pango_fc_font_map_list_families (PangoFontMap *fontmap,
count = 0;
for (i = 0; i < fontset->nfont; i++)
{
- FcChar8 *s;
+ char *s;
FcResult res;
int spacing;
- res = FcPatternGetString (fontset->fonts[i], FC_FAMILY, 0, (FcChar8 **) &s);
+ res = FcPatternGetString (fontset->fonts[i], FC_FAMILY, 0, (FcChar8 **)(void*)&s);
g_assert (res == FcResultMatch);
res = FcPatternGetInteger (fontset->fonts[i], FC_SPACING, 0, &spacing);
@@ -689,7 +689,7 @@ pango_fc_font_map_list_families (PangoFontMap *fontmap,
if (!is_alias_family (s) && !g_hash_table_lookup (temp_family_hash, s))
{
- PangoFcFamily *temp_family = create_family (fcfontmap, (gchar *)s, spacing);
+ PangoFcFamily *temp_family = create_family (fcfontmap, s, spacing);
g_hash_table_insert (temp_family_hash, g_strdup (s), s);
priv->families[count++] = temp_family;
}
@@ -846,7 +846,7 @@ pango_fc_make_pattern (const PangoFontDescription *description,
families = g_strsplit (pango_font_description_get_family (description), ",", -1);
for (i = 0; families[i]; i++)
- FcPatternAddString (pattern, FC_FAMILY, families[i]);
+ FcPatternAddString (pattern, FC_FAMILY, (FcChar8*) families[i]);
g_strfreev (families);
@@ -856,11 +856,11 @@ pango_fc_make_pattern (const PangoFontDescription *description,
if (gravity != PANGO_GRAVITY_SOUTH)
{
GEnumValue *value = g_enum_get_value (get_gravity_class (), gravity);
- FcPatternAddString (pattern, PANGO_FC_GRAVITY, value->value_nick);
+ FcPatternAddString (pattern, PANGO_FC_GRAVITY, (FcChar8*) value->value_nick);
}
if (prgname)
- FcPatternAddString (pattern, PANGO_FC_PRGNAME, prgname);
+ FcPatternAddString (pattern, PANGO_FC_PRGNAME, (FcChar8*) prgname);
return pattern;
}
@@ -1051,7 +1051,6 @@ pango_fc_font_map_get_patterns (PangoFontMap *fontmap,
int f;
PangoFcPatternSet *patterns;
FcFontSet *font_patterns;
- PangoMatrix matrix;
FontsetHashKey key;
if (!language && context)
@@ -1136,7 +1135,7 @@ pango_fc_font_map_get_patterns (PangoFontMap *fontmap,
}
static gboolean
-get_first_font (PangoFontset *fontset,
+get_first_font (PangoFontset *fontset G_GNUC_UNUSED,
PangoFont *font,
gpointer data)
{
@@ -1333,7 +1332,7 @@ _pango_fc_font_map_get_coverage (PangoFcFontMap *fcfontmap,
* a filename/index pair; there shouldn't be any reason
* this isn't true, but it's not specified anywhere
*/
- if (FcPatternGetString (fcfont->font_pattern, FC_FILE, 0, (FcChar8 **) &key.filename) != FcResultMatch)
+ if (FcPatternGetString (fcfont->font_pattern, FC_FILE, 0, (FcChar8 **)(void*)&key.filename) != FcResultMatch)
return NULL;
if (FcPatternGetInteger (fcfont->font_pattern, FC_INDEX, 0, &key.id) != FcResultMatch)
@@ -1440,7 +1439,7 @@ pango_fc_font_map_create_context (PangoFcFontMap *fcfontmap)
}
static void
-cleanup_font (gpointer key,
+cleanup_font (gpointer key G_GNUC_UNUSED,
PangoFcFont *fcfont)
{
_pango_fc_font_shutdown (fcfont);
@@ -1630,7 +1629,7 @@ pango_fc_font_description_from_pattern (FcPattern *pattern, gboolean include_siz
* the pattern */
if (FcPatternGetString (pattern, PANGO_FC_GRAVITY, 0, (FcChar8 **)&s) == FcResultMatch)
{
- GEnumValue *value = g_enum_get_value_by_nick (get_gravity_class (), s);
+ GEnumValue *value = g_enum_get_value_by_nick (get_gravity_class (), (char *)s);
gravity = value->value;
pango_font_description_set_gravity (desc, gravity);
@@ -1735,8 +1734,8 @@ pango_fc_face_list_sizes (PangoFontFace *face,
FcObjectSet *objectset;
pattern = FcPatternCreate ();
- FcPatternAddString (pattern, FC_FAMILY, fcface->family->family_name);
- FcPatternAddString (pattern, FC_STYLE, fcface->style);
+ FcPatternAddString (pattern, FC_FAMILY, (FcChar8*)(void*)fcface->family->family_name);
+ FcPatternAddString (pattern, FC_STYLE, (FcChar8*)(void*)fcface->style);
objectset = FcObjectSetCreate ();
FcObjectSetAdd (objectset, FC_PIXEL_SIZE);
@@ -1912,7 +1911,7 @@ pango_fc_family_list_faces (PangoFontFamily *family,
for (i = 0; i < fontset->nfont; i++)
{
- FcChar8 *style, *font_style = NULL;
+ const char *style, *font_style = NULL;
int weight, slant;
if (FcPatternGetInteger(fontset->fonts[i], FC_WEIGHT, 0, &weight) != FcResultMatch)
@@ -1921,7 +1920,7 @@ pango_fc_family_list_faces (PangoFontFamily *family,
if (FcPatternGetInteger(fontset->fonts[i], FC_SLANT, 0, &slant) != FcResultMatch)
slant = FC_SLANT_ROMAN;
- if (FcPatternGetString (fontset->fonts[i], FC_STYLE, 0, &font_style) != FcResultMatch)
+ if (FcPatternGetString (fontset->fonts[i], FC_STYLE, 0, (FcChar8 **)(void*)&font_style) != FcResultMatch)
font_style = NULL;
if (weight <= FC_WEIGHT_MEDIUM)
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c
index 143be802..2dc13c37 100644
--- a/pango/pangoft2-fontmap.c
+++ b/pango/pangoft2-fontmap.c
@@ -341,7 +341,7 @@ _pango_ft2_font_map_default_substitute (PangoFcFontMap *fcfontmap,
static double
pango_ft2_font_map_get_resolution (PangoFcFontMap *fcfontmap,
- PangoContext *context)
+ PangoContext *context G_GNUC_UNUSED)
{
return ((PangoFT2FontMap *)fcfontmap)->dpi_y;
}
diff --git a/pango/pangoft2-render.c b/pango/pangoft2-render.c
index a18f98b0..bd3b7d40 100644
--- a/pango/pangoft2-render.c
+++ b/pango/pangoft2-render.c
@@ -65,7 +65,7 @@ static void pango_ft2_renderer_draw_trapezoid (PangoRenderer *renderer,
G_DEFINE_TYPE (PangoFT2Renderer, pango_ft2_renderer, PANGO_TYPE_RENDERER)
static void
-pango_ft2_renderer_init (PangoFT2Renderer *renderer)
+pango_ft2_renderer_init (PangoFT2Renderer *renderer G_GNUC_UNUSED)
{
}
@@ -437,7 +437,7 @@ interpolate_position (Position *result,
*/
static void
pango_ft2_renderer_draw_trapezoid (PangoRenderer *renderer,
- PangoRenderPart part,
+ PangoRenderPart part G_GNUC_UNUSED,
double y1,
double x11,
double x21,
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index b3d97535..d13dc694 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -239,7 +239,7 @@ pango_ft2_font_get_face (PangoFont *font)
if (error != FT_Err_Ok)
{
bail0:
- load_fallback_face (ft2font, filename);
+ load_fallback_face (ft2font, (char *) filename);
}
g_assert (ft2font->face);
@@ -420,12 +420,12 @@ pango_ft2_font_real_lock_face (PangoFcFont *font)
}
static void
-pango_ft2_font_real_unlock_face (PangoFcFont *font)
+pango_ft2_font_real_unlock_face (PangoFcFont *font G_GNUC_UNUSED)
{
}
static gboolean
-pango_ft2_free_glyph_info_callback (gpointer key,
+pango_ft2_free_glyph_info_callback (gpointer key G_GNUC_UNUSED,
gpointer value,
gpointer data)
{