freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (


From: Werner LEMBERG
Subject: Re: [ft-devel] Bug on PowerPC: Illegal Intruction in FT_Get_Name_Index (worksforme)
Date: Wed, 25 May 2005 06:21:46 +0200 (CEST)

> > Uh, oh, those two warnings are still there for your compiler?  Then
> > your double-cast patch has no effect :-( I'm not able to verify that
> > because I don't get any warning with 3.3.3 with and without your
> > change.
> 
> No, double casting solves the error problem on C++, [...]

Hmm, it compiled fine on C++ even without your recent change!

> You don't get these two with -pedantic?

Yep.  This seems to be a buglet in gcc which has been fixed in later
versions.

> > The code is specific to the sfnt module.
> 
> Right.  But why does it really need to return two functions with
> completely different signatures?

It should always return a pointer to FT_Module_Interface.

> And another question, where is output returned by this function
> used?

In sfobjs.c there is a call to FT_Get_Module_Interface which asks for
the `sfnt' service.

The idea of this function is to split the `sfnt' service into two
subservices, namely `get_sfnt' and `load_sfnt' which can be accessed
separately.  Since this is the only place where this functionality is
implemented and used it is easily possible that there are buglets in
the declaration of the involved functions and data structures.

Hmm, after checking the source it is probably best to remove the
offending lines completely.  No part of the FreeType library asks for
those subservices, so it is dead code currently.  David?

> AFAIU there should be the same warning somewhere else when you cast
> the void* back to a function pointer, unless there's no code that
> uses this function (directly or indirectly) in the FreeType code.
> Is it the case?

Surprisingly, there's no warning anywhere else.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]