[pango] Fix compiler warnings



commit beecf8f88188391132d30b940c2a312ecaebba3a
Author: Behdad Esfahbod <behdad behdad org>
Date:   Sun May 1 21:06:16 2011 -0400

    Fix compiler warnings

 pango/pango-engine.c    |   18 ++++++++++++------
 pango/pango-fontset.c   |   10 ++++++----
 pango/pango-utils.c     |    2 +-
 pango/pangofc-fontmap.c |    1 -
 pango/pangox.c          |    2 --
 5 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
index bb109e5..1a49385 100644
--- a/pango/pango-engine.c
+++ b/pango/pango-engine.c
@@ -25,6 +25,9 @@
 #include "pango-engine-private.h"
 #include "pango-impl-utils.h"
 
+
+G_DEFINE_ABSTRACT_TYPE (PangoEngine, pango_engine, G_TYPE_OBJECT);
+
 static void
 pango_engine_init (PangoEngine *self)
 {
@@ -35,8 +38,8 @@ pango_engine_class_init (PangoEngineClass *klass)
 {
 }
 
-G_DEFINE_ABSTRACT_TYPE (PangoEngine, pango_engine, G_TYPE_OBJECT);
 
+G_DEFINE_ABSTRACT_TYPE (PangoEngineLang, pango_engine_lang, PANGO_TYPE_ENGINE);
 
 static void
 pango_engine_lang_init (PangoEngineLang *self)
@@ -48,7 +51,6 @@ pango_engine_lang_class_init (PangoEngineLangClass *klass)
 {
 }
 
-G_DEFINE_ABSTRACT_TYPE (PangoEngineLang, pango_engine_lang, PANGO_TYPE_ENGINE);
 
 static PangoCoverageLevel
 pango_engine_shape_real_covers (PangoEngineShape *engine G_GNUC_UNUSED,
@@ -65,6 +67,9 @@ pango_engine_shape_real_covers (PangoEngineShape *engine G_GNUC_UNUSED,
   return result;
 }
 
+
+G_DEFINE_ABSTRACT_TYPE (PangoEngineShape, pango_engine_shape, PANGO_TYPE_ENGINE);
+
 static void
 pango_engine_shape_init (PangoEngineShape *klass)
 {
@@ -76,8 +81,6 @@ pango_engine_shape_class_init (PangoEngineShapeClass *class)
   class->covers = pango_engine_shape_real_covers;
 }
 
-G_DEFINE_ABSTRACT_TYPE (PangoEngineShape, pango_engine_shape, PANGO_TYPE_ENGINE);
-
 void
 _pango_engine_shape_shape (PangoEngineShape *engine,
 			   PangoFont        *font,
@@ -174,6 +177,11 @@ fallback_engine_covers (PangoEngineShape *engine G_GNUC_UNUSED,
   return PANGO_COVERAGE_NONE;
 }
 
+
+static GType pango_fallback_engine_get_type (void);
+
+G_DEFINE_ABSTRACT_TYPE (PangoFallbackEngine, pango_fallback_engine, PANGO_TYPE_ENGINE_SHAPE);
+
 static void
 pango_fallback_engine_init (PangoFallbackEngine *self)
 {
@@ -186,8 +194,6 @@ pango_fallback_engine_class_init (PangoFallbackEngineClass *class)
   class->script_shape = fallback_engine_shape;
 }
 
-G_DEFINE_ABSTRACT_TYPE (PangoFallbackEngine, pango_fallback_engine, PANGO_TYPE_ENGINE_SHAPE);
-
 PangoEngineShape *
 _pango_get_fallback_shaper (void)
 {
diff --git a/pango/pango-fontset.c b/pango/pango-fontset.c
index 9ca2644..7c382b3 100644
--- a/pango/pango-fontset.c
+++ b/pango/pango-fontset.c
@@ -32,6 +32,9 @@
 
 static PangoFontMetrics *pango_fontset_real_get_metrics (PangoFontset      *fontset);
 
+
+G_DEFINE_ABSTRACT_TYPE (PangoFontset, pango_fontset, G_TYPE_OBJECT);
+
 static void
 pango_fontset_init (PangoFontset *self)
 {
@@ -43,7 +46,6 @@ pango_fontset_class_init (PangoFontsetClass *class)
   class->get_metrics = pango_fontset_real_get_metrics;
 }
 
-G_DEFINE_ABSTRACT_TYPE (PangoFontset, pango_fontset, G_TYPE_OBJECT);
 
 /**
  * pango_fontset_get_font:
@@ -206,7 +208,6 @@ pango_fontset_real_get_metrics (PangoFontset  *fontset)
 #define PANGO_FONTSET_SIMPLE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONTSET_SIMPLE, PangoFontsetSimpleClass))
 
 static void              pango_fontset_simple_finalize     (GObject                 *object);
-static void              pango_fontset_simple_init         (PangoFontsetSimple      *fontset);
 static PangoFontMetrics *pango_fontset_simple_get_metrics  (PangoFontset            *fontset);
 static PangoLanguage *   pango_fontset_simple_get_language (PangoFontset            *fontset);
 static  PangoFont *      pango_fontset_simple_get_font     (PangoFontset            *fontset,
@@ -249,6 +250,9 @@ pango_fontset_simple_new (PangoLanguage *language)
   return fontset;
 }
 
+
+G_DEFINE_TYPE (PangoFontsetSimple, pango_fontset_simple, PANGO_TYPE_FONTSET);
+
 static void
 pango_fontset_simple_class_init (PangoFontsetSimpleClass *class)
 {
@@ -271,8 +275,6 @@ pango_fontset_simple_init (PangoFontsetSimple *fontset)
   fontset->language = NULL;
 }
 
-G_DEFINE_TYPE (PangoFontsetSimple, pango_fontset_simple, PANGO_TYPE_FONTSET);
-
 static void
 pango_fontset_simple_finalize (GObject *object)
 {
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 052da9c..4e95b95 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -726,7 +726,7 @@ pango_get_sysconf_subdirectory (void)
 G_CONST_RETURN char *
 pango_get_lib_subdirectory (void)
 {
-  static gchar *result = NULL;
+  static const gchar *result = NULL;
 
   if (result == NULL)
     {
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 0553502..2348968 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -790,7 +790,6 @@ pango_fc_patterns_get_font_pattern (PangoFcPatterns *pats, int i)
  */
 
 static void              pango_fc_fontset_finalize     (GObject                 *object);
-static void              pango_fc_fontset_init         (PangoFcFontset      *fontset);
 static PangoLanguage *   pango_fc_fontset_get_language (PangoFontset            *fontset);
 static  PangoFont *      pango_fc_fontset_get_font     (PangoFontset            *fontset,
 							guint                    wc);
diff --git a/pango/pangox.c b/pango/pangox.c
index 00a0964..24bca5e 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -69,8 +69,6 @@ struct _PangoXFontClass
   PangoFontClass parent_class;
 };
 
-static void pango_x_font_class_init (PangoXFontClass *class);
-static void pango_x_font_init       (PangoXFont      *xfont);
 static void pango_x_font_dispose    (GObject         *object);
 static void pango_x_font_finalize   (GObject         *object);
 



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