Re: pango patch -- fix some warnings, at least one bug
- From: Owen Taylor <otaylor redhat com>
- To: Darin Adler <darin bentspoon com>
- Cc: gtk-devel-list gnome org
- Subject: Re: pango patch -- fix some warnings, at least one bug
- Date: 12 Jul 2001 11:49:14 -0400
Darin Adler <darin bentspoon com> writes:
> I fixed a bunch of warnings. In one case, I had to do a bit of
> research, since the warning indicated a missing non-obvious line of
> code.
>
> OK to commit?
Yes, looks good (with two suggestions below).
Thanks,
Owen
> Index: modules/arabic/arabic-x.c
> ===================================================================
> RCS file: /cvs/gnome/pango/modules/arabic/arabic-x.c,v
> retrieving revision 1.21
> diff -p -u -r1.21 arabic-x.c
> --- modules/arabic/arabic-x.c 2001/06/25 15:09:39 1.21
> +++ modules/arabic/arabic-x.c 2001/07/11 23:39:32
> @@ -178,7 +178,7 @@ arabic_engine_shape (PangoFont *f
> PangoGlyphString *glyphs)
> {
> PangoXSubfont subfont;
> - long n_chars;
> + int n_chars;
> int i;
> ArabicFontInfo *fs;
> const char *p;
I think it would be marginally better to change the argument to
arabic_reshape() instead.
> Index: modules/tamil/tamil-x.c
> ===================================================================
> RCS file: /cvs/gnome/pango/modules/tamil/tamil-x.c,v
> retrieving revision 1.13
> diff -p -u -r1.13 tamil-x.c
> --- modules/tamil/tamil-x.c 2001/06/14 20:38:22 1.13
> +++ modules/tamil/tamil-x.c 2001/07/11 23:39:33
> @@ -232,7 +232,7 @@ tamil_engine_shape (PangoFont *fo
> wc = (gunichar *)g_malloc (sizeof(gunichar) * n_chars * 2);
>
> p = text;
> - prevchar = 0;complete = 1;/* One character look behind */
> + prevchar = 0;currchar = 0;complete = 1;/* One character look behind */
> n_glyph = 0;
> cluster_start = text;
Could you do this as:
gunichar currchar = 0; /* Quiet compiler */
To indicate that the assignment is just a dummy to suppress a spurious
warning. (Initializing currchar to 0 doesn't actually make sense - 0
is not a legitimate value.)
> Index: pango/opentype/ftxgpos.c
> ===================================================================
> RCS file: /cvs/gnome/pango/pango/opentype/ftxgpos.c,v
> retrieving revision 1.1
> diff -p -u -r1.1 ftxgpos.c
> --- pango/opentype/ftxgpos.c 2000/12/20 04:41:36 1.1
> +++ pango/opentype/ftxgpos.c 2001/07/11 23:39:45
> @@ -873,6 +873,8 @@
>
> if ( gpi->face->glyph->format != ft_glyph_format_outline )
> return TTO_Err_Invalid_GPOS_SubTable;
> +
> + ap = an->af.af2.AnchorPoint;
>
> outline = gpi->face->glyph->outline;
Yep this looks right.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]