freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] freetype compilation warnings


From: Werner LEMBERG
Subject: Re: [ft-devel] freetype compilation warnings
Date: Thu, 17 Dec 2009 17:32:11 +0100 (CET)

> I'm afraid it still warns, which doesn't surprise me (I don't think
> changing from enum to #define changes the sign of the constant).

Hmm.  An enumeration is implicitly a signed int, whereas I've always
thought that the compiler automatically assigns either signed or
unsigned to (positive) constant values, depending on the other value
of the binop (the `&' in this case).  Apparently, this is wrong
thinking.

> Just getting rid of _debug_mem_dummy would cause a problem?  Is
> there another way to create a non-empty file?  How about a useless
> but harmless #include, like #include <string.h>?

Ah, I haven't thought of that.  Sounds like a good idea.

>>> WARNING: While resolving call to function 'FTC_GNode_Compare'
>>> arguments were dropped!
>>
>>This is something I don't understand at all.  I have never seen such
>>a warning before, and I have no idea what it means.  Can you
>>elaborate?
>
> I'd never seen it either.  It's from the llvm compiler.
>
> I _think_ the cause is ftccache.h line 204 (current git):
>
>   FTC_Node_CompareFunc  _nodcomp = (FTC_Node_CompareFunc)(nodecmp);
>
> FTC_GNode_Compare() has 2 parameters:
>
>   FT_LOCAL( FT_Bool )
>   FTC_GNode_Compare( FTC_GNode   gnode,
>                      FTC_GQuery  gquery );
>
> but it's being cast to FTC_Node_CompareFunc which is 3 parameters:
>
>   typedef FT_Bool
>   (*FTC_Node_CompareFunc)( FTC_Node    node,
>                            FT_Pointer  key,
>                            FTC_Cache   cache );

Thanks for the analysis; will check this soon.


    Werner




reply via email to

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