pango r2766 - in trunk: . pango pango/opentype



Author: behdad
Date: Fri Dec 26 02:31:35 2008
New Revision: 2766
URL: http://svn.gnome.org/viewvc/pango?rev=2766&view=rev

Log:
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.

Modified:
   trunk/ChangeLog
   trunk/pango/modules.c
   trunk/pango/opentype/harfbuzz-gpos.c
   trunk/pango/pango-bidi-type.c
   trunk/pango/pango-coverage.c
   trunk/pango/pango-engine.c
   trunk/pango/pango-fontmap.c
   trunk/pango/pango-ot-ruleset.c
   trunk/pango/pangofc-decoder.c
   trunk/pango/pangofc-font.c
   trunk/pango/pangofc-fontmap.c
   trunk/pango/pangoft2-fontmap.c
   trunk/pango/pangoft2-render.c
   trunk/pango/pangoft2.c

Modified: trunk/pango/modules.c
==============================================================================
--- trunk/pango/modules.c	(original)
+++ trunk/pango/modules.c	Fri Dec 26 02:31:35 2008
@@ -178,13 +178,13 @@
 
       /* 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 @@
 }
 
 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);
 }

Modified: trunk/pango/opentype/harfbuzz-gpos.c
==============================================================================
--- trunk/pango/opentype/harfbuzz-gpos.c	(original)
+++ trunk/pango/opentype/harfbuzz-gpos.c	Fri Dec 26 02:31:35 2008
@@ -96,7 +96,7 @@
   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 */

Modified: trunk/pango/pango-bidi-type.c
==============================================================================
--- trunk/pango/pango-bidi-type.c	(original)
+++ trunk/pango/pango-bidi-type.c	Fri Dec 26 02:31:35 2008
@@ -24,6 +24,7 @@
 #include <string.h>
 
 #include "pango-bidi-type.h"
+#include "pango-utils.h"
 
 #include "mini-fribidi/fribidi.h"
 

Modified: trunk/pango/pango-coverage.c
==============================================================================
--- trunk/pango/pango-coverage.c	(original)
+++ trunk/pango/pango-coverage.c	Fri Dec 26 02:31:35 2008
@@ -122,7 +122,7 @@
 {
   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 @@
   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);

Modified: trunk/pango/pango-engine.c
==============================================================================
--- trunk/pango/pango-engine.c	(original)
+++ trunk/pango/pango-engine.c	Fri Dec 26 02:31:35 2008
@@ -34,7 +34,7 @@
 			    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 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 @@
 }
 
 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;
 }

Modified: trunk/pango/pango-fontmap.c
==============================================================================
--- trunk/pango/pango-fontmap.c	(original)
+++ trunk/pango/pango-fontmap.c	Fri Dec 26 02:31:35 2008
@@ -39,7 +39,7 @@
 }
 
 static void
-pango_font_map_init (PangoFontMap *fontmap)
+pango_font_map_init (PangoFontMap *fontmap G_GNUC_UNUSED)
 {
 }
 

Modified: trunk/pango/pango-ot-ruleset.c
==============================================================================
--- trunk/pango/pango-ot-ruleset.c	(original)
+++ trunk/pango/pango-ot-ruleset.c	Fri Dec 26 02:31:35 2008
@@ -93,7 +93,7 @@
 
   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 @@
   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;
 }

Modified: trunk/pango/pangofc-decoder.c
==============================================================================
--- trunk/pango/pangofc-decoder.c	(original)
+++ trunk/pango/pangofc-decoder.c	Fri Dec 26 02:31:35 2008
@@ -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)
 {
 }
 

Modified: trunk/pango/pangofc-font.c
==============================================================================
--- trunk/pango/pangofc-font.c	(original)
+++ trunk/pango/pangofc-font.c	Fri Dec 26 02:31:35 2008
@@ -283,7 +283,7 @@
 }
 
 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 @@
 
 static PangoCoverage *
 pango_fc_font_get_coverage (PangoFont     *font,
-			    PangoLanguage *language)
+			    PangoLanguage *language G_GNUC_UNUSED)
 {
   PangoFcFont *fcfont = (PangoFcFont *)font;
   PangoFcFontPrivate *priv = fcfont->priv;

Modified: trunk/pango/pangofc-fontmap.c
==============================================================================
--- trunk/pango/pangofc-fontmap.c	(original)
+++ trunk/pango/pangofc-fontmap.c	Fri Dec 26 02:31:35 2008
@@ -675,11 +675,11 @@
       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 @@
 
 	  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 @@
   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 @@
   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 @@
   int f;
   PangoFcPatternSet *patterns;
   FcFontSet *font_patterns;
-  PangoMatrix matrix;
   FontsetHashKey key;
 
   if (!language && context)
@@ -1136,7 +1135,7 @@
 }
 
 static gboolean
-get_first_font (PangoFontset  *fontset,
+get_first_font (PangoFontset  *fontset G_GNUC_UNUSED,
 		PangoFont     *font,
 		gpointer       data)
 {
@@ -1333,7 +1332,7 @@
    * 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 @@
 }
 
 static void
-cleanup_font (gpointer        key,
+cleanup_font (gpointer        key G_GNUC_UNUSED,
 	      PangoFcFont    *fcfont)
 {
   _pango_fc_font_shutdown (fcfont);
@@ -1630,7 +1629,7 @@
    * 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 @@
   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 @@
 
 	  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 @@
 	      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)

Modified: trunk/pango/pangoft2-fontmap.c
==============================================================================
--- trunk/pango/pangoft2-fontmap.c	(original)
+++ trunk/pango/pangoft2-fontmap.c	Fri Dec 26 02:31:35 2008
@@ -341,7 +341,7 @@
 
 static double
 pango_ft2_font_map_get_resolution (PangoFcFontMap       *fcfontmap,
-				   PangoContext         *context)
+				   PangoContext         *context G_GNUC_UNUSED)
 {
   return ((PangoFT2FontMap *)fcfontmap)->dpi_y;
 }

Modified: trunk/pango/pangoft2-render.c
==============================================================================
--- trunk/pango/pangoft2-render.c	(original)
+++ trunk/pango/pangoft2-render.c	Fri Dec 26 02:31:35 2008
@@ -65,7 +65,7 @@
 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 @@
  */
 static void
 pango_ft2_renderer_draw_trapezoid (PangoRenderer   *renderer,
-				   PangoRenderPart  part,
+				   PangoRenderPart  part G_GNUC_UNUSED,
 				   double           y1,
 				   double           x11,
 				   double           x21,

Modified: trunk/pango/pangoft2.c
==============================================================================
--- trunk/pango/pangoft2.c	(original)
+++ trunk/pango/pangoft2.c	Fri Dec 26 02:31:35 2008
@@ -239,7 +239,7 @@
       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 @@
 }
 
 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)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]