freetype-devel
[Top][All Lists]
Advanced

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

Re: new compiler warnings since 2.10.x


From: Alexei Podtelezhnikov
Subject: Re: new compiler warnings since 2.10.x
Date: Sun, 5 Jun 2022 00:10:02 -0400

Hi Hin-Tak,

> freetype-2.12.1/src/smooth/ftgrays.c: In function 'gray_convert_glyph':
> freetype-2.12.1/src/smooth/ftgrays.c:1968:20: warning: storing the address of 
> local variable 'buffer' in 'worker_56(D)->ycells' [-Wdangling-pointer=]
>  1968 |     ras.ycells     = (PCell*)buffer;
>      |                    ^
> freetype-2.12.1/src/smooth/ftgrays.c:1950:14: note: 'buffer' declared here>
>  1950 |     TCell    buffer[FT_MAX_GRAY_POOL];
>      |              ^~~~~~
> freetype-2.12.1/src/smooth/ftgrays.c:1950:14: note: 'worker_56(D)' declared 
> here

Do they really complain that we dare to allocate on the stack? I don't
even know how to address this. There was a request to move the pool to
the heap recently. I do not know if this is an issue. Same with b/w
rasterizer. Same with autohinter.

> ft2demos-2.12.1/graph/gblblit.c: In function '_gblender_spans_rgb565':
> ft2demos-2.12.1/graph/gblblit.c:158:69: warning: 'color' is used 
> uninitialized [-Wuninitialized]
>   158 | #define  GDST_PIX(p,d)           unsigned int  p = 
> GRGB565_TO_RGB24(*(unsigned short*)(d))
>       |                                                                     ^
> In file included from ft2demos-2.12.1/graph/gblblit.c:178:
> ft2demos-2.12.1/graph/gblany.h:49:19: note: 'color' declared here
>    49 |   grColor         color   = surface->color;
>       |                   ^~~~~

This *looks* like 'color' initialization to me. I am puzzled and I
think it is a false warning.

Alexei



reply via email to

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