summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-12-26 02:20:59 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-12-26 02:20:59 +0000
commit069472e0b2bb810e335c0e28a37dcb71e6843030 (patch)
treeb951fc3e6921d9fd675e3ac93ee7350c574bf6cc /pango
parentcea6473bcf6456e531304fc23c473e33475ad05c (diff)
downloadpango-069472e0b2bb810e335c0e28a37dcb71e6843030.tar.gz
Fix 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), (pango_font_metrics_unref), (pango_font_family_class_init), (pango_font_family_init), (pango_font_face_class_init), (pango_font_face_init): * pango/pango-attributes.c (pango_attr_list_ref), (pango_attr_list_unref), (pango_attr_iterator_get_font): * pango/pango-layout.c (pango_layout_set_height), (extents_free), (no_shape_filter_func), (pango_layout_line_ref), (pango_layout_line_unref), (pango_layout_get_item_properties): * pango/pango-markup.c (end_element_handler), (text_handler), (b_parse_func), (big_parse_func), (span_parse_func), (i_parse_func), (markup_parse_func), (s_parse_func), (sub_parse_func), (sup_parse_func), (small_parse_func), (tt_parse_func), (u_parse_func): * pango/pango-ot-info.c (get_glyph_class): * pango/pango-renderer.c (get_item_properties), (pango_renderer_default_prepare_run): * pango/pango-utils.c (_pango_shape_shape): * pango/pangocairo-fcfontmap.c (pango_cairo_fc_font_map_get_font_type), (pango_cairo_fc_font_map_context_substitute), (pango_cairo_fc_font_map_context_key_get), (pango_cairo_fc_font_map_context_key_copy), (pango_cairo_fc_font_map_context_key_free), (pango_cairo_fc_font_map_context_key_hash), (pango_cairo_fc_font_map_context_key_equal): * pango/pangocairo-fontmap.c (pango_cairo_font_map_new_for_font_type), (pango_cairo_font_map_set_default): * pango/pangocairo-render.c (pango_cairo_renderer_init): * pango/pangox-fontcache.c (free_cache_entry): * pango/pangox-fontmap.c (close_display_cb), (list_families_foreach), (pango_x_font_map_load_font), (ignore_error): * pango/pangox.c (average_width_foreach), (subfonts_foreach), (pango_x_font_find_shaper), (pango_x_get_unknown_glyph), (pango_x_get_item_properties), (pango_x_apply_ligatures), (pango_x_font_get_unknown_glyph): * pango/pangoxft-fontmap.c (pango_xft_font_map_init), (close_display_cb): * pango/querymodules.c (show_version): Fix warnings. svn path=/trunk/; revision=2765
Diffstat (limited to 'pango')
-rw-r--r--pango/break.c80
-rw-r--r--pango/fonts.c18
-rw-r--r--pango/pango-attributes.c6
-rw-r--r--pango/pango-layout.c13
-rw-r--r--pango/pango-markup.c66
-rw-r--r--pango/pango-ot-info.c2
-rw-r--r--pango/pango-renderer.c4
-rw-r--r--pango/pango-utils.c2
-rw-r--r--pango/pangocairo-fcfontmap.c14
-rw-r--r--pango/pangocairo-fontmap.c4
-rw-r--r--pango/pangocairo-render.c2
-rw-r--r--pango/pangox-fontcache.c2
-rw-r--r--pango/pangox-fontmap.c12
-rw-r--r--pango/pangox.c22
-rw-r--r--pango/pangoxft-fontmap.c4
-rw-r--r--pango/querymodules.c8
16 files changed, 130 insertions, 129 deletions
diff --git a/pango/break.c b/pango/break.c
index 0bb320e3..db3053a7 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -481,9 +481,9 @@ typedef enum
void
pango_default_break (const gchar *text,
gint length,
- PangoAnalysis *analysis,
+ PangoAnalysis *analysis G_GNUC_UNUSED,
PangoLogAttr *attrs,
- int attrs_len)
+ int attrs_len G_GNUC_UNUSED)
{
/* The rationale for all this is in section 5.15 of the Unicode 3.0 book,
* the line breaking stuff is also in TR14 on unicode.org
@@ -651,7 +651,7 @@ pango_default_break (const gchar *text,
GraphemeBreakType GB_type;
/* Find the GraphemeBreakType of wc */
GB_type = GB_Other;
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_FORMAT:
if (wc == 0x200C && wc == 0x200D)
@@ -769,7 +769,7 @@ pango_default_break (const gchar *text,
}
if (WB_type == WB_Other)
- switch (break_type)
+ switch ((int) break_type)
{
case G_UNICODE_BREAK_NUMERIC:
if (wc != 0x066C)
@@ -782,7 +782,7 @@ pango_default_break (const gchar *text,
}
if (WB_type == WB_Other)
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_CONTROL:
if (wc != 0x000D && wc != 0x000A && wc != 0x000B && wc != 0x000C && wc != 0x0085)
@@ -935,7 +935,7 @@ pango_default_break (const gchar *text,
attrs[i].is_char_break = TRUE;
/* Make any necessary replacements first */
- switch (prev_break_type)
+ switch ((int) prev_break_type)
{
case G_UNICODE_BREAK_HANGUL_L_JAMO:
case G_UNICODE_BREAK_HANGUL_V_JAMO:
@@ -966,7 +966,7 @@ pango_default_break (const gchar *text,
;
}
- switch (prev_break_type)
+ switch ((int) prev_break_type)
{
case G_UNICODE_BREAK_MANDATORY:
case G_UNICODE_BREAK_LINE_FEED:
@@ -1008,7 +1008,7 @@ pango_default_break (const gchar *text,
* boundaries.
*/
- switch (break_type)
+ switch ((int) break_type)
{
case G_UNICODE_BREAK_MANDATORY:
case G_UNICODE_BREAK_LINE_FEED:
@@ -1073,29 +1073,29 @@ pango_default_break (const gchar *text,
break;
}
- if (break_op != BREAK_ALREADY_HANDLED)
+ switch (break_op)
{
- switch (break_op)
- {
- case BREAK_PROHIBITED:
- /* can't break here */
- attrs[i].is_char_break = FALSE;
- break;
+ case BREAK_PROHIBITED:
+ /* can't break here */
+ attrs[i].is_char_break = FALSE;
+ break;
- case BREAK_IF_SPACES:
- /* break if prev char was space */
- if (prev_was_break_space)
- attrs[i].is_line_break = TRUE;
- break;
+ case BREAK_IF_SPACES:
+ /* break if prev char was space */
+ if (prev_was_break_space)
+ attrs[i].is_line_break = TRUE;
+ break;
- case BREAK_ALLOWED:
- attrs[i].is_line_break = TRUE;
- break;
+ case BREAK_ALLOWED:
+ attrs[i].is_line_break = TRUE;
+ break;
- default:
- g_assert_not_reached ();
- break;
- }
+ case BREAK_ALREADY_HANDLED:
+ break;
+
+ default:
+ g_assert_not_reached ();
+ break;
}
}
@@ -1117,7 +1117,7 @@ pango_default_break (const gchar *text,
if (current_word_type != WordNone)
{
/* Check for a word end */
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_COMBINING_MARK:
case G_UNICODE_ENCLOSING_MARK:
@@ -1184,7 +1184,7 @@ pango_default_break (const gchar *text,
else
{
/* Check for a word start */
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_LOWERCASE_LETTER:
case G_UNICODE_MODIFIER_LETTER:
@@ -1226,7 +1226,7 @@ pango_default_break (const gchar *text,
*/
#define MAYBE_START_NEW_SENTENCE \
- switch (type) \
+ switch ((int) type) \
{ \
case G_UNICODE_LINE_SEPARATOR: \
case G_UNICODE_PARAGRAPH_SEPARATOR: \
@@ -1259,7 +1259,7 @@ pango_default_break (const gchar *text,
/* Break after line/para separators except carriage return
* followed by newline
*/
- switch (prev_type)
+ switch ((int) prev_type)
{
case G_UNICODE_LINE_SEPARATOR:
case G_UNICODE_PARAGRAPH_SEPARATOR:
@@ -1281,7 +1281,7 @@ pango_default_break (const gchar *text,
/* break before para/line separators except newline following
* carriage return
*/
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_LINE_SEPARATOR:
case G_UNICODE_PARAGRAPH_SEPARATOR:
@@ -1304,7 +1304,7 @@ pango_default_break (const gchar *text,
{
case STATE_SENTENCE_OUTSIDE:
/* Start sentence if we have non-whitespace/format/control */
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_LINE_SEPARATOR:
case G_UNICODE_PARAGRAPH_SEPARATOR:
@@ -1342,7 +1342,7 @@ pango_default_break (const gchar *text,
* loosely-specified OTHER_PUNCTUATION such as period,
* comma, etc.; follow Unicode rules for breaks
*/
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_OTHER_PUNCTUATION:
case G_UNICODE_CLOSE_PUNCTUATION:
@@ -1386,7 +1386,7 @@ pango_default_break (const gchar *text,
/* End sentence on anything besides more punctuation; follow
* rules for breaks
*/
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_OTHER_PUNCTUATION:
case G_UNICODE_CLOSE_PUNCTUATION:
@@ -1440,7 +1440,7 @@ pango_default_break (const gchar *text,
* we had to see a space, which ends the sentence.
*/
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_SPACE_SEPARATOR:
/* continue in this state */
@@ -1479,7 +1479,7 @@ pango_default_break (const gchar *text,
break;
case STATE_SENTENCE_DOT:
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_CLOSE_PUNCTUATION:
sentence_state = STATE_SENTENCE_POST_DOT_CLOSE;
@@ -1508,7 +1508,7 @@ pango_default_break (const gchar *text,
break;
case STATE_SENTENCE_POST_DOT_CLOSE:
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_SPACE_SEPARATOR:
possible_sentence_end = i;
@@ -1536,7 +1536,7 @@ pango_default_break (const gchar *text,
possible_sentence_boundary = i;
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_SPACE_SEPARATOR:
/* remain in current state */
@@ -1572,7 +1572,7 @@ pango_default_break (const gchar *text,
break;
case STATE_SENTENCE_POST_DOT_OPEN:
- switch (type)
+ switch ((int) type)
{
case G_UNICODE_OPEN_PUNCTUATION:
/* continue in current state */
diff --git a/pango/fonts.c b/pango/fonts.c
index 34c0e248..74b36ab5 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -946,7 +946,7 @@ find_field_any (const char *str, int len, PangoFontDescription *desc)
#define FIELD(NAME, MASK) \
G_STMT_START { \
if (find_field (NAME##_map, G_N_ELEMENTS (NAME##_map), str, len, \
- desc ? (int *)&desc->NAME : NULL)) \
+ desc ? (int *)(void *)&desc->NAME : NULL)) \
{ \
if (desc) \
desc->mask |= MASK; \
@@ -1248,12 +1248,12 @@ pango_font_description_to_filename (const PangoFontDescription *desc)
G_DEFINE_ABSTRACT_TYPE (PangoFont, pango_font, G_TYPE_OBJECT)
static void
-pango_font_class_init (PangoFontClass *class)
+pango_font_class_init (PangoFontClass *class G_GNUC_UNUSED)
{
}
static void
-pango_font_init (PangoFont *font)
+pango_font_init (PangoFont *font G_GNUC_UNUSED)
{
}
@@ -1510,7 +1510,7 @@ pango_font_metrics_ref (PangoFontMetrics *metrics)
if (metrics == NULL)
return NULL;
- g_atomic_int_inc (&metrics->ref_count);
+ g_atomic_int_inc ((int *) &metrics->ref_count);
return metrics;
}
@@ -1531,7 +1531,7 @@ pango_font_metrics_unref (PangoFontMetrics *metrics)
g_return_if_fail (metrics->ref_count > 0 );
- if (g_atomic_int_dec_and_test (&metrics->ref_count))
+ if (g_atomic_int_dec_and_test ((int *) &metrics->ref_count))
g_slice_free (PangoFontMetrics, metrics);
}
@@ -1700,12 +1700,12 @@ pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics)
G_DEFINE_ABSTRACT_TYPE (PangoFontFamily, pango_font_family, G_TYPE_OBJECT)
static void
-pango_font_family_class_init (PangoFontFamilyClass *class)
+pango_font_family_class_init (PangoFontFamilyClass *class G_GNUC_UNUSED)
{
}
static void
-pango_font_family_init (PangoFontFamily *family)
+pango_font_family_init (PangoFontFamily *family G_GNUC_UNUSED)
{
}
@@ -1789,12 +1789,12 @@ pango_font_family_is_monospace (PangoFontFamily *family)
G_DEFINE_ABSTRACT_TYPE (PangoFontFace, pango_font_face, G_TYPE_OBJECT)
static void
-pango_font_face_class_init (PangoFontFaceClass *class)
+pango_font_face_class_init (PangoFontFaceClass *class G_GNUC_UNUSED)
{
}
static void
-pango_font_face_init (PangoFontFace *face)
+pango_font_face_init (PangoFontFace *face G_GNUC_UNUSED)
{
}
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 5e5e5857..49cca1e4 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1131,7 +1131,7 @@ pango_attr_list_ref (PangoAttrList *list)
if (list == NULL)
return NULL;
- g_atomic_int_inc (&list->ref_count);
+ g_atomic_int_inc ((int *) &list->ref_count);
return list;
}
@@ -1154,7 +1154,7 @@ pango_attr_list_unref (PangoAttrList *list)
g_return_if_fail (list->ref_count > 0);
- if (g_atomic_int_dec_and_test (&list->ref_count))
+ if (g_atomic_int_dec_and_test ((int *) &list->ref_count))
{
tmp_list = list->attributes;
while (tmp_list)
@@ -1828,7 +1828,7 @@ pango_attr_iterator_get_font (PangoAttrIterator *iterator,
PangoAttribute *attr = tmp_list1->data;
tmp_list1 = tmp_list1->next;
- switch (attr->klass->type)
+ switch ((int) attr->klass->type)
{
case PANGO_ATTR_FONT_DESC:
{
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 6be30bd1..dd5b26b8 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -429,7 +429,8 @@ pango_layout_set_height (PangoLayout *layout,
* Bug 549003
*/
if (layout->ellipsize != PANGO_ELLIPSIZE_NONE &&
- !(layout->lines && layout->is_ellipsized == FALSE && layout->line_count <= -height))
+ !(layout->lines && layout->is_ellipsized == FALSE &&
+ height < 0 && layout->line_count <= (guint) -height))
pango_layout_clear_lines (layout);
}
}
@@ -2791,7 +2792,7 @@ free_run (PangoLayoutRun *run, gpointer data)
}
static void
-extents_free (Extents *ext, gpointer data)
+extents_free (Extents *ext, gpointer data G_GNUC_UNUSED)
{
g_slice_free (Extents, ext);
}
@@ -3668,7 +3669,7 @@ pango_layout_get_effective_attributes (PangoLayout *layout)
static gboolean
no_shape_filter_func (PangoAttribute *attribute,
- gpointer data)
+ gpointer data G_GNUC_UNUSED)
{
static const PangoAttrType no_shape_types[] = {
PANGO_ATTR_FOREGROUND,
@@ -3904,7 +3905,7 @@ pango_layout_line_ref (PangoLayoutLine *line)
if (line == NULL)
return NULL;
- g_atomic_int_inc (&private->ref_count);
+ g_atomic_int_inc ((int *) &private->ref_count);
return line;
}
@@ -3927,7 +3928,7 @@ pango_layout_line_unref (PangoLayoutLine *line)
g_return_if_fail (private->ref_count > 0);
- if (g_atomic_int_dec_and_test (&private->ref_count))
+ if (g_atomic_int_dec_and_test ((int *) &private->ref_count))
{
g_slist_foreach (line->runs, (GFunc)free_run, GINT_TO_POINTER (1));
g_slist_free (line->runs);
@@ -5228,7 +5229,7 @@ pango_layout_get_item_properties (PangoItem *item,
{
PangoAttribute *attr = tmp_list->data;
- switch (attr->klass->type)
+ switch ((int) attr->klass->type)
{
case PANGO_ATTR_UNDERLINE:
properties->uline = ((PangoAttrInt *)attr)->value;
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index f0e78941..f5c96498 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -405,20 +405,20 @@ start_element_handler (GMarkupParseContext *context,
}
static void
-end_element_handler (GMarkupParseContext *context,
- const gchar *element_name,
+end_element_handler (GMarkupParseContext *context G_GNUC_UNUSED,
+ const gchar *element_name G_GNUC_UNUSED,
gpointer user_data,
- GError **error)
+ GError **error G_GNUC_UNUSED)
{
markup_data_close_tag (user_data);
}
static void
-text_handler (GMarkupParseContext *context,
+text_handler (GMarkupParseContext *context G_GNUC_UNUSED,
const gchar *text,
gsize text_len,
gpointer user_data,
- GError **error)
+ GError **error G_GNUC_UNUSED)
{
MarkupData *md = user_data;
@@ -746,10 +746,10 @@ add_attribute (OpenTag *ot,
} }G_STMT_END
static gboolean
-b_parse_func (MarkupData *md,
+b_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
@@ -759,10 +759,10 @@ b_parse_func (MarkupData *md,
}
static gboolean
-big_parse_func (MarkupData *md,
+big_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
@@ -950,7 +950,7 @@ span_parse_enum (const char *attr_name,
}
static gboolean
-span_parse_func (MarkupData *md,
+span_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
const gchar **values,
@@ -1244,7 +1244,7 @@ span_parse_func (MarkupData *md,
{
PangoUnderline ul = PANGO_UNDERLINE_NONE;
- if (!span_parse_enum ("underline", underline, PANGO_TYPE_UNDERLINE, &ul, line_number, error))
+ if (!span_parse_enum ("underline", underline, PANGO_TYPE_UNDERLINE, (int *) &ul, line_number, error))
goto error;
add_attribute (tag, pango_attr_underline_new (ul));
@@ -1264,7 +1264,7 @@ span_parse_func (MarkupData *md,
{
PangoGravity gr = PANGO_GRAVITY_SOUTH;
- if (!span_parse_enum ("gravity", gravity, PANGO_TYPE_GRAVITY, &gr, line_number, error))
+ if (!span_parse_enum ("gravity", gravity, PANGO_TYPE_GRAVITY, (int *) &gr, line_number, error))
goto error;
add_attribute (tag, pango_attr_gravity_new (gr));
@@ -1274,7 +1274,7 @@ span_parse_func (MarkupData *md,
{
PangoGravityHint hint = PANGO_GRAVITY_HINT_NATURAL;
- if (!span_parse_enum ("gravity_hint", gravity_hint, PANGO_TYPE_GRAVITY_HINT, &hint, line_number, error))
+ if (!span_parse_enum ("gravity_hint", gravity_hint, PANGO_TYPE_GRAVITY_HINT, (int *) &hint, line_number, error))
goto error;
add_attribute (tag, pango_attr_gravity_hint_new (hint));
@@ -1344,10 +1344,10 @@ span_parse_func (MarkupData *md,
}
static gboolean
-i_parse_func (MarkupData *md,
+i_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
@@ -1358,12 +1358,12 @@ i_parse_func (MarkupData *md,
}
static gboolean
-markup_parse_func (MarkupData *md,
- OpenTag *tag,
- const gchar **names,
- const gchar **values,
- GMarkupParseContext *context,
- GError **error)
+markup_parse_func (MarkupData *md G_GNUC_UNUSED,
+ OpenTag *tag G_GNUC_UNUSED,
+ const gchar **names G_GNUC_UNUSED,
+ const gchar **values G_GNUC_UNUSED,
+ GMarkupParseContext *context G_GNUC_UNUSED,
+ GError **error G_GNUC_UNUSED)
{
/* We don't do anything with this tag at the moment. */
@@ -1371,10 +1371,10 @@ markup_parse_func (MarkupData *md,
}
static gboolean
-s_parse_func (MarkupData *md,
+s_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
@@ -1387,10 +1387,10 @@ s_parse_func (MarkupData *md,
#define SUPERSUB_RISE 5000
static gboolean
-sub_parse_func (MarkupData *md,
+sub_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
@@ -1409,10 +1409,10 @@ sub_parse_func (MarkupData *md,
}
static gboolean
-sup_parse_func (MarkupData *md,
+sup_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
@@ -1431,10 +1431,10 @@ sup_parse_func (MarkupData *md,
}
static gboolean
-small_parse_func (MarkupData *md,
+small_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
@@ -1451,10 +1451,10 @@ small_parse_func (MarkupData *md,
}
static gboolean
-tt_parse_func (MarkupData *md,
+tt_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
@@ -1466,10 +1466,10 @@ tt_parse_func (MarkupData *md,
}
static gboolean
-u_parse_func (MarkupData *md,
+u_parse_func (MarkupData *md G_GNUC_UNUSED,
OpenTag *tag,
const gchar **names,
- const gchar **values,
+ const gchar **values G_GNUC_UNUSED,
GMarkupParseContext *context,
GError **error)
{
diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c
index 55dc86ad..e581aea4 100644
--- a/pango/pango-ot-info.c
+++ b/pango/pango-ot-info.c
@@ -177,7 +177,7 @@ get_glyph_class (gunichar charcode,
(charcode >= 0xFE70 && charcode <= 0XFEFF)) /* Arabic Presentation Forms-B */
return FALSE;
- switch (g_unichar_type (charcode))
+ switch ((int) g_unichar_type (charcode))
{
case G_UNICODE_COMBINING_MARK:
case G_UNICODE_ENCLOSING_MARK:
diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c
index 96ffe506..d89d53f5 100644
--- a/pango/pango-renderer.c
+++ b/pango/pango-renderer.c
@@ -400,7 +400,7 @@ get_item_properties (PangoItem *item,
{
PangoAttribute *attr = l->data;
- switch (attr->klass->type)
+ switch ((int) attr->klass->type)
{
case PANGO_ATTR_SHAPE:
if (shape_attr)
@@ -1265,7 +1265,7 @@ pango_renderer_default_prepare_run (PangoRenderer *renderer,
{
PangoAttribute *attr = l->data;
- switch (attr->klass->type)
+ switch ((int) attr->klass->type)
{
case PANGO_ATTR_UNDERLINE:
renderer->underline = ((PangoAttrInt *)attr)->value;
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index fae4e7f2..e9018fbb 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -1613,7 +1613,7 @@ pango_extents_to_pixels (PangoRectangle *inclusive,
void
_pango_shape_shape (const char *text,
gint n_chars,
- PangoRectangle *shape_ink,
+ PangoRectangle *shape_ink G_GNUC_UNUSED,
PangoRectangle *shape_logical,
PangoGlyphString *glyphs)
{
diff --git a/pango/pangocairo-fcfontmap.c b/pango/pangocairo-fcfontmap.c
index fb929da3..ee6af537 100644
--- a/pango/pangocairo-fcfontmap.c
+++ b/pango/pangocairo-fcfontmap.c
@@ -53,7 +53,7 @@ pango_cairo_fc_font_map_get_resolution_cairo (PangoCairoFontMap *cfontmap)
}
static cairo_font_type_t
-pango_cairo_fc_font_map_get_font_type (PangoCairoFontMap *cfontmap)
+pango_cairo_fc_font_map_get_font_type (PangoCairoFontMap *cfontmap G_GNUC_UNUSED)
{
return CAIRO_FONT_TYPE_FT;
}
@@ -80,7 +80,7 @@ pango_cairo_fc_font_map_finalize (GObject *object)
}
static void
-pango_cairo_fc_font_map_context_substitute (PangoFcFontMap *fcfontmap,
+pango_cairo_fc_font_map_context_substitute (PangoFcFontMap *fcfontmap G_GNUC_UNUSED,
PangoContext *context,
FcPattern *pattern)
{
@@ -114,21 +114,21 @@ pango_cairo_fc_font_map_get_resolution_fc (PangoFcFontMap *fcfontmap,
}
static gconstpointer
-pango_cairo_fc_font_map_context_key_get (PangoFcFontMap *fcfontmap,
+pango_cairo_fc_font_map_context_key_get (PangoFcFontMap *fcfontmap G_GNUC_UNUSED,
PangoContext *context)
{
return _pango_cairo_context_get_merged_font_options (context);
}
static gpointer
-pango_cairo_fc_font_map_context_key_copy (PangoFcFontMap *fcfontmap,
+pango_cairo_fc_font_map_context_key_copy (PangoFcFontMap *fcfontmap G_GNUC_UNUSED,
gconstpointer key)
{
return cairo_font_options_copy (key);
}
static void
-pango_cairo_fc_font_map_context_key_free (PangoFcFontMap *fcfontmap,
+pango_cairo_fc_font_map_context_key_free (PangoFcFontMap *fcfontmap G_GNUC_UNUSED,
gpointer key)
{
cairo_font_options_destroy (key);
@@ -136,14 +136,14 @@ pango_cairo_fc_font_map_context_key_free (PangoFcFontMap *fcfontmap,
static guint32
-pango_cairo_fc_font_map_context_key_hash (PangoFcFontMap *fcfontmap,
+pango_cairo_fc_font_map_context_key_hash (PangoFcFontMap *fcfontmap G_GNUC_UNUSED,
gconstpointer key)
{
return (guint32)cairo_font_options_hash (key);
}
static gboolean
-pango_cairo_fc_font_map_context_key_equal (PangoFcFontMap *fcfontmap,
+pango_cairo_fc_font_map_context_key_equal (PangoFcFontMap *fcfontmap G_GNUC_UNUSED,
gconstpointer key_a,
gconstpointer key_b)
{
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c
index 3731196e..ae917d06 100644
--- a/pango/pangocairo-fontmap.c
+++ b/pango/pangocairo-fontmap.c
@@ -127,7 +127,7 @@ pango_cairo_font_map_new_for_font_type (cairo_font_type_t fonttype)
/* Make sure that the type system is initialized */
g_type_init ();
- switch (fonttype)
+ switch ((int) fonttype)
{
#if defined(HAVE_CAIRO_ATSUI)
case CAIRO_FONT_TYPE_QUARTZ:
@@ -206,7 +206,7 @@ pango_cairo_font_map_set_default (PangoCairoFontMap *fontmap)
if (fontmap)
g_object_ref (fontmap);
- default_font_map = fontmap;
+ default_font_map = (PangoFontMap *) fontmap;
}
/**
diff --git a/pango/pangocairo-render.c b/pango/pangocairo-render.c
index ab7eed90..8be2614f 100644
--- a/pango/pangocairo-render.c
+++ b/pango/pangocairo-render.c
@@ -644,7 +644,7 @@ pango_cairo_renderer_draw_shape (PangoRenderer *renderer,
}
static void
-pango_cairo_renderer_init (PangoCairoRenderer *renderer)
+pango_cairo_renderer_init (PangoCairoRenderer *renderer G_GNUC_UNUSED)
{
}
diff --git a/pango/pangox-fontcache.c b/pango/pangox-fontcache.c
index c1177b8b..f60b8c9e 100644
--- a/pango/pangox-fontcache.c
+++ b/pango/pangox-fontcache.c
@@ -53,7 +53,7 @@ struct _CacheEntry
};
static void
-free_cache_entry (char *xlfd,
+free_cache_entry (char *xlfd G_GNUC_UNUSED,
CacheEntry *entry,
PangoXFontCache *cache)
{
diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c
index 1cfc0aec..9303334b 100644
--- a/pango/pangox-fontmap.c
+++ b/pango/pangox-fontmap.c
@@ -233,7 +233,7 @@ static GSList *registered_displays;
static int
close_display_cb (Display *display,
- XExtCodes *extcodes)
+ XExtCodes *extcodes G_GNUC_UNUSED)
{
pango_x_shutdown_display (display);
registered_displays = g_slist_remove (registered_displays, display);
@@ -397,7 +397,7 @@ pango_x_font_map_finalize (GObject *object)
}
static void
-list_families_foreach (gpointer key,
+list_families_foreach (gpointer key G_GNUC_UNUSED,
gpointer value,
gpointer user_data)
{
@@ -459,7 +459,7 @@ pango_x_get_font_family (PangoXFontMap *xfontmap,
static PangoFont *
pango_x_font_map_load_font (PangoFontMap *fontmap,
- PangoContext *context,
+ PangoContext *context G_GNUC_UNUSED,
const PangoFontDescription *description)
{
PangoXFontMap *xfontmap = (PangoXFontMap *)fontmap;
@@ -545,8 +545,8 @@ pango_x_font_map_load_font (PangoFontMap *fontmap,
static gboolean error_occurred;
static int
-ignore_error (Display *d,
- XErrorEvent *e)
+ignore_error (Display *d G_GNUC_UNUSED,
+ XErrorEvent *e G_GNUC_UNUSED)
{
return 0;
}
@@ -1643,7 +1643,7 @@ pango_x_family_list_faces (PangoFontFamily *family,
}
}
-G_CONST_RETURN char *
+static G_CONST_RETURN char *
pango_x_family_get_name (PangoFontFamily *family)
{
PangoXFamily *xfamily = PANGO_X_FAMILY (family);
diff --git a/pango/pangox.c b/pango/pangox.c
index 3b00d95f..c49024f0 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -929,7 +929,7 @@ get_font_metrics_from_string (PangoFont *font,
}
static void
-average_width_foreach (PangoFont *font,
+average_width_foreach (PangoFont *font G_GNUC_UNUSED,
PangoGlyphInfo *glyph_info,
gpointer data)
{
@@ -1276,7 +1276,7 @@ pango_x_font_dispose (GObject *object)
static void
-subfonts_foreach (gpointer key, gpointer value, gpointer data)
+subfonts_foreach (gpointer key, gpointer value, gpointer data G_GNUC_UNUSED)
{
g_free (key);
g_free (value);
@@ -1372,7 +1372,7 @@ pango_x_font_get_coverage (PangoFont *font,
}
static PangoEngineShape *
-pango_x_font_find_shaper (PangoFont *font,
+pango_x_font_find_shaper (PangoFont *font G_GNUC_UNUSED,
PangoLanguage *language,
guint32 ch)
{
@@ -1471,7 +1471,7 @@ pango_x_find_glyph (PangoFont *font,
* Return value: a glyph index into @font.
**/
PangoGlyph
-pango_x_get_unknown_glyph (PangoFont *font)
+pango_x_get_unknown_glyph (PangoFont *font G_GNUC_UNUSED)
{
return PANGO_GET_UNKNOWN_GLYPH (0);
}
@@ -1666,7 +1666,7 @@ pango_x_get_item_properties (PangoItem *item,
{
PangoAttribute *attr = tmp_list->data;
- switch (attr->klass->type)
+ switch ((int) attr->klass->type)
{
case PANGO_ATTR_UNDERLINE:
if (uline)
@@ -1709,11 +1709,11 @@ pango_x_get_item_properties (PangoItem *item,
* Return value: %FALSE, always.
*/
gboolean
-pango_x_apply_ligatures (PangoFont *font,
- PangoXSubfont subfont_id,
- gunichar **glyphs,
- int *n_glyphs,
- int **clusters)
+pango_x_apply_ligatures (PangoFont *font G_GNUC_UNUSED,
+ PangoXSubfont subfont_id G_GNUC_UNUSED,
+ gunichar **glyphs G_GNUC_UNUSED,
+ int *n_glyphs G_GNUC_UNUSED,
+ int **clusters G_GNUC_UNUSED)
{
return FALSE;
}
@@ -1816,7 +1816,7 @@ pango_x_fallback_shape (PangoFont *font,
* Return value: a glyph index into @font.
*/
PangoGlyph
-pango_x_font_get_unknown_glyph (PangoFont *font,
+pango_x_font_get_unknown_glyph (PangoFont *font G_GNUC_UNUSED,
gunichar wc)
{
return PANGO_GET_UNKNOWN_GLYPH (wc);
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index 7047b214..2feb4982 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -81,7 +81,7 @@ pango_xft_font_map_class_init (PangoXftFontMapClass *class)
}
static void
-pango_xft_font_map_init (PangoXftFontMap *xftfontmap)
+pango_xft_font_map_init (PangoXftFontMap *xftfontmap G_GNUC_UNUSED)
{
}
@@ -130,7 +130,7 @@ static GSList *registered_displays;
static int
close_display_cb (Display *display,
- XExtCodes *extcodes)
+ XExtCodes *extcodes G_GNUC_UNUSED)
{
GSList *tmp_list;
diff --git a/pango/querymodules.c b/pango/querymodules.c
index 91888a2a..45949f81 100644
--- a/pango/querymodules.c
+++ b/pango/querymodules.c
@@ -183,10 +183,10 @@ query_module (const char *dir, const char *name)
}
static gboolean
-show_version(const char *name,
- const char *arg,
- gpointer data,
- GError **error)
+show_version(const char *name G_GNUC_UNUSED,
+ const char *arg G_GNUC_UNUSED,
+ gpointer data G_GNUC_UNUSED,
+ GError **error G_GNUC_UNUSED)
{
g_printf("pango-querymodules (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION);
g_printf("module interface version: %s\n", MODULE_VERSION);