提交 9717127a 编写于 作者: B Behdad Esfahbod 提交者: Behdad Esfahbod

Turn various gcc warnings off. Adding const, adding static, fully

2005-11-04  Behdad Esfahbod  <behdad@gnome.org>

        * configure.in, examples/argcontext.c examples/cairoview.c,
        examples/renderdemo.c, examples/renderdemo.h examples/xftview.c,
        modules/basic/basic-x.c, modules/hangul/hangul-fc.c,
        modules/hebrew/hebrew-shaper.c, modules/hebrew/hebrew-shaper.h,
        modules/indic/indic-fc.c, modules/indic/mprefixups.c,
        modules/syriac/syriac-fc.c, pango/break.c pango/fonts.c,
        pango/modules.c, pango/pango-coverage.c pango/pango-engine.c,
        pango/pango-engine.h, pango/pango-fontmap.c,
        pango/pango-fontset.c, pango/pango-impl-utils.h,
        pango/pango-layout.c, pango/pango-layout.h,
        pango/pango-renderer.c, pango/pango-script.c,
        pango/pango-utils.c, pango/pangocairo-fc.h,
        pango/pangocairo-font.c, pango/pangocairo-fontmap.c,
        pango/pangocairo-private.h, pango/pangofc-decoder.c,
        pango/pangofc-font.c, pango/pangofc-fontmap.c pango/pangoft2.c,
        pango/pangox-fontcache.c, pango/pangox-fontmap.c pango/pangox.c,
        pango/pangoxft-font.c, pango/querymodules.c,
        pango/opentype/ftglue.c, pango/opentype/ftxgpos.c,
        pango/opentype/ftxopen.c, pango/opentype/pango-ot-buffer.c,
        pango/opentype/pango-ot-info.c,
        pango/opentype/pango-ot-ruleset.c, tests/dump-boundaries.c,
        tests/testboundaries.c, tests/testcolor.c tests/testiter.c,
        tests/testscript.c: Turn various gcc warnings off. Adding const,
        adding static, fully initializing structs, match signedness in
        comparisons. (#317804)

        * tests/testscript.c, tools/gen-script-for-lang.c:
        (scripts_for_file): Pass error->message instead of error to fail(),
        which was wrong.
        (compare_lang): Fix typo comparing a and a instead of a and b.
上级 c0505f3b
......@@ -138,7 +138,7 @@ ftglue_stream_seek( FT_Stream stream,
if ( stream->read( stream, pos, 0, 0 ) )
error = FT_Err_Invalid_Stream_Operation;
}
else if ( pos > stream->size )
else if ( pos > (FT_Long)stream->size )
error = FT_Err_Invalid_Stream_Operation;
LOG(( "ftglue:stream:seek(%ld) -> %d\n", pos, error ));
......
......@@ -2154,6 +2154,7 @@
base_offset = FILE_Pos();
fprintf (stderr, "%04lx base offset (behdad)\n", base_offset);
if ( ACCESS_Frame( 4L ) )
return error;
......@@ -2163,6 +2164,9 @@
FORGET_Frame();
if (mbp->PosFormat != 1)
return TTO_Err_Invalid_SubTable_Format;
cur_offset = FILE_Pos();
if ( FILE_Seek( new_offset ) ||
( error = Load_Coverage( &mbp->MarkCoverage, stream ) ) != TT_Err_Ok )
......
......@@ -904,6 +904,7 @@
return Load_Coverage2( &c->cf.cf2, stream );
default:
fprintf (stderr, "at ftxopen.c:907, got %d (behdad)\n", c->CoverageFormat);
return TTO_Err_Invalid_SubTable_Format;
}
......
......@@ -211,7 +211,7 @@ pango_ot_buffer_output (PangoOTBuffer *buffer,
FT_Face face;
PangoOTInfo *info;
TTO_GDEF gdef = NULL;
int i;
unsigned int i;
int last_cluster;
face = pango_fc_font_lock_face (buffer->font);
......@@ -240,7 +240,7 @@ pango_ot_buffer_output (PangoOTBuffer *buffer,
gdef = pango_ot_info_get_gdef (info);
/* Apply default positioning */
for (i = 0; i < glyphs->num_glyphs; i++)
for (i = 0; i < (unsigned int)glyphs->num_glyphs; i++)
{
if (glyphs->glyphs[i].glyph)
{
......
......@@ -52,7 +52,8 @@ pango_ot_info_get_type (void)
NULL, /* class_data */
sizeof (PangoOTInfo),
0, /* n_preallocs */
NULL /* init */
NULL, /* init */
NULL, /* value_table */
};
object_type = g_type_register_static (G_TYPE_OBJECT,
......@@ -217,7 +218,7 @@ synthesize_class_def (PangoOTInfo *info)
FT_UShort *classes;
FT_ULong charcode;
FT_UInt glyph;
int i, j;
unsigned int i, j;
FT_CharMap old_charmap;
old_charmap = info->face->charmap;
......
......@@ -55,6 +55,7 @@ pango_ot_ruleset_get_type (void)
sizeof (PangoOTRuleset),
0, /* n_preallocs */
(GInstanceInitFunc)pango_ot_ruleset_init,
NULL /* value_table */
};
object_type = g_type_register_static (G_TYPE_OBJECT,
......@@ -140,7 +141,7 @@ void
pango_ot_ruleset_substitute (PangoOTRuleset *ruleset,
PangoOTBuffer *buffer)
{
int i;
unsigned int i;
TTO_GSUB gsub = NULL;
......@@ -173,7 +174,7 @@ void
pango_ot_ruleset_position (PangoOTRuleset *ruleset,
PangoOTBuffer *buffer)
{
int i;
unsigned int i;
TTO_GPOS gpos = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册