diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2008-12-26 02:20:59 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2008-12-26 02:20:59 +0000 |
commit | 069472e0b2bb810e335c0e28a37dcb71e6843030 (patch) | |
tree | b951fc3e6921d9fd675e3ac93ee7350c574bf6cc /pango/break.c | |
parent | cea6473bcf6456e531304fc23c473e33475ad05c (diff) | |
download | pango-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/break.c')
-rw-r--r-- | pango/break.c | 80 |
1 files changed, 40 insertions, 40 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 */ |