freetype-devel
[Top][All Lists]
Advanced

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

Re: Logging Library-GSOC


From: Priyesh kumar
Subject: Re: Logging Library-GSOC
Date: Fri, 24 Jul 2020 17:28:55 +0530

Hi,
I was working on removing the warnings which get triggered after enabling macro `FT_LOGGING' in
ftoption.h file to use dlg library for logging on a file.
If `FT_LOGGING' macro is enabled FT_TRACE messages are handled by dlg's API which internally uses
a function of `printf' like format, therefore, I was getting many [-Wformat=] warnings. 
I have updated the code locally to handle most of these warnings.
But there are several other warnings like which I don't know how to fix:
====
freetype2/src/cache/ftcbasic.c:112:19: warning: too many arguments for format [-Wformat-extra-args]
  112 |       FT_TRACE1(( "ftc_basic_family_get_count:"
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
freetype2/src/smooth/ftgrays.c:499:3: warning: ‘gray_dump_cells’ defined but not used [-Wunused-function]
  499 |   gray_dump_cells( RAS_ARG )
--
freetype2/src/sfnt/sfwoff2.c:1924:19: warning: too many arguments for format [-Wformat-extra-args]
 1924 |       FT_TRACE2(( "  %c%c%c%c  %08d  %08d    %08ld  %08ld\n",
--
freetype2/src/bdf/bdfdrivr.c:913:23: warning: format ‘%lx’ expects a matching ‘long unsigned int’ argument [-Wformat]
  913 |           FT_TRACE1(( "bdf_get_bdf_property:"
--
freetype2/src/bdf/bdfdrivr.c:903:23: warning: format ‘%x’ expects a matching ‘unsigned int’ argument [-Wformat=]
  903 |           FT_TRACE1(( "bdf_get_bdf_property:"
--
freetype2/src/bdf/bdfdrivr.c:186:19: warning: format ‘%x’ expects a matching ‘unsigned int’ argument [-Wformat=]
  186 |       FT_TRACE1(( "bdf_cmap_char_next: charcode 0x%x > 32bit API" ));
--
freetype2/src/pcf/pcfdrivr.c:610:23: warning: format ‘%x’ expects a matching ‘unsigned int’ argument [-Wformat=]
  610 |           FT_TRACE1(( " too large integer 0x%x is truncated\n" ));
--
freetype2/src/truetype/ttgxvar.c:1732:21: warning: too many arguments for format [-Wformat-extra-args]
 1732 |         FT_TRACE6(( "      tuple coordinate is zero, ignore\n", i ));
--
freetype2/src/base/ftoutln.c:277:17: warning: too many arguments for format [-Wformat-extra-args]
  277 |     FT_TRACE5(( "FT_Outline_Decompose: Done\n", n ));
====
Please take a look at this.

Thanks,
Priyesh

On Thu, Jul 23, 2020 at 1:27 AM Werner LEMBERG <wl@gnu.org> wrote:

Hello Priyesh,


> I have used FT2_DEBUG=any:7 with:
>
>   ./test arial.ttf *qwertyuiopasdfghjklzxcvbnm*
>
> and I have got following results:
>
>   FT_LOGGING:           387ms  (here dlg writes logs to stderr)
>   FT_DEBUG_LEVEL_TRACE: 305 ms (FreeType writes logs to stderr,
>                                 no redirection to text file)

Finally some realistic, expected results :-)

> I have also updated `builds/freetype.mk` so that in Linux, dlg is
> built like rest of the modules in FreeType.

Thanks!

> And I wanted to ask that should I also go ahead add a visual studios
> project in `src/dlg` to build dlg on windows?  For this, we have to
> add a Windows command script to copy the files from
> `submodules/dlg/` to `src/dlg`...

I think this is the right approach.  Alexei?


    Werner

reply via email to

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