[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new compiler warnings since 2.10.x
From: |
Hin-Tak Leung |
Subject: |
new compiler warnings since 2.10.x |
Date: |
Sun, 5 Jun 2022 00:34:47 +0000 (UTC) |
Hi Werner and the rest of the gang,
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.
Hin-Tak
P.S. had a quick look, seem some of these are old codes and used to be compiled
out, but somehow FT_CONFIG_OPTION_INCREMENTAL is now on. The color and rsvg
stuff look new. Not sure about the memset().
freetype-2.12.1/src/truetype/ttgload.c: In function 'load_truetype_glyph':
freetype-2.12.1/src/truetype/ttgload.c:1697:22: warning: storing the address of
local variable 'inc_stream' in 'loader_482(D)->stream' [-Wdangling-pointer=]
1697 | loader->stream = &inc_stream;
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
freetype-2.12.1/src/truetype/ttgload.c:1627:21: note: 'inc_stream' declared here
1627 | FT_StreamRec inc_stream;
| ^~~~~~~~~~
freetype-2.12.1/src/truetype/ttgload.c:1627:21: note: 'loader_482(D)' declared
here
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
freetype-2.12.1/src/smooth/ftgrays.c:1961:26: warning: storing the address of
local variable 'buffer' in 'worker_41(D)->cell_null' [-Wdangling-pointer=]
1961 | ras.cell_null = buffer + FT_MAX_GRAY_POOL - 1;
| ^
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_41(D)' declared here
In function 'memset',
inlined from 'af_face_globals_new' at
freetype-2.12.1/src/autofit/afglobal.c:345:5:
/usr/include/bits/string_fortified.h:59:10: warning: '__builtin_memset' writing
696 bytes into a region of size 0 overflows the destination
[-Wstringop-overflow=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^
src/rsvg-port.c: In function 'rsvg_port_preset_slot':
src/rsvg-port.c:309:7: warning: 'rsvg_handle_render_cairo' is deprecated: Use
'rsvg_handle_render_document' instead [-Wdeprecated-declarations]
309 | ret = rsvg_handle_render_cairo ( handle, rec_cr );
| ^~~
In file included from /usr/include/librsvg-2.0/librsvg/rsvg.h:1450,
from src/rsvg-port.c:25:
/usr/include/librsvg-2.0/librsvg/rsvg-cairo.h:88:10: note: declared here
88 | gboolean rsvg_handle_render_cairo (RsvgHandle *handle, cairo_t *cr);
| ^~~~~~~~~~~~~~~~~~~~~~~~
src/rsvg-port.c:323:7: warning: 'rsvg_handle_render_cairo_sub' is deprecated:
Use 'rsvg_handle_render_layer' instead [-Wdeprecated-declarations]
323 | ret = rsvg_handle_render_cairo_sub( handle, rec_cr, str );
| ^~~
/usr/include/librsvg-2.0/librsvg/rsvg-cairo.h:153:10: note: declared here
153 | gboolean rsvg_handle_render_cairo_sub (RsvgHandle *handle, cairo_t *cr,
const char *id);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
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;
| ^~~~~
ft2demos-2.12.1/graph/gblblit.c: In function '_gblender_spans_rgb555':
ft2demos-2.12.1/graph/gblblit.c:187:69: warning: 'color' is used uninitialized
[-Wuninitialized]
187 | #define GDST_PIX(p,d) unsigned int p =
GRGB555_TO_RGB24(*(unsigned short*)(d))
| ^
In file included from ft2demos-2.12.1/graph/gblblit.c:207:
ft2demos-2.12.1/graph/gblany.h:49:19: note: 'color' declared here
49 | grColor color = surface->color;
| ^~~~~
- new compiler warnings since 2.10.x,
Hin-Tak Leung <=