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: Sean McBride
Subject: Re: [ft-devel] freetype compilation warnings
Date: Thu, 17 Dec 2009 11:04:35 -0500

On 12/16/09 6:14 PM, Werner LEMBERG said:

>> I don't think your fix was right, the warnings are still there:
>> <http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=494016>
>>
>> Note that those lines have 2 comparisons, not sure which it is
>> complaining about...
>
>OK, hopefully it's now really fixed in git.  Please test.

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).  Which
compiler do you use?  You should be able to repro with gcc's -Wextra or -
Wsign-compare I think.

>> <http://www.cdash.org/CDash/buildSummary.php?buildid=493582>
>> /.../VTK/Utilities/vtkfreetype/src/base/ftdbgmem.c:992: warning:
>> `_debug_mem_dummy' defined but not used
>
>This is expected, more or less:
>
>  #if FT_DEBUG_MEMORY
>  ...
>  #else  /* !FT_DEBUG_MEMORY */
>
>    /* ANSI C doesn't like empty source files */
>    static const FT_Byte  _debug_mem_dummy = 0;
>
>  #endif /* !FT_DEBUG_MEMORY */
>
>If you know a clean method to avoid the warning, please tell me.

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>?

>> <http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=493423>
>> 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 );

--
____________________________________________________________
Sean McBride, B. Eng                 address@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada






reply via email to

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