Re: new compiler warnings since 2.10.x
On Sunday, 5 June 2022, 12:31:10 GMT+8, Werner LEMBERG wrote: > Define 'now'! It was enabled by default 12 years ago in version> 2.3.12... Sorry :-). It is likely from the newer gcc 12 on fedora 36, then. I was just git-blaming those lines and found they have been around forever, but seemed to be in an #ifdef . If it is not the #define then it is new compiler... I'll have another look later, possibly with a different compiler inside docker, when I am more settled with the new system. The librsvg and color stuff are likely in newly added code. Hin-Tak
Re: new compiler warnings since 2.10.x
>> 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 | TCellbuffer[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. Exactly my thoughts. Is this warning active by default? If yes, do you have suggestions how to fix it? Werner
Re: new compiler warnings since 2.10.x
Hello Hin-Tak, > Am trying to ugrade my system to fedora 36 (with my > FontVal-customized backend...) and saw quite a large number of new > compiler warnings... so I checked my past build logs, and see that a > few of them were new to 2.11.1 (2.11.0 was clean), and a few more > added in 2.12.x . Details below. Thanks, will have a look. > P.S. [...] seem some of these are old codes and used to be compiled > out, but somehow FT_CONFIG_OPTION_INCREMENTAL is now on. Define 'now'! It was enabled by default 12 years ago in version 2.3.12... Werner
Re: new compiler warnings since 2.10.x
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 | TCellbuffer[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