|
From: | Alan Coopersmith |
Subject: | Re: a couple of compiler warnings with gcc 11 on freetype 2.10.4 |
Date: | Mon, 12 Jul 2021 11:20:01 -0700 |
User-agent: | Mozilla/5.0 (X11; SunOS i86pc; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 |
On 7/4/21 1:24 PM, Hin-Tak Leung via FreeType development wrote:
Hi Werner, There are two new warnings from building 2.10.4 on current fedora. One is likely from the newer gcc 11: src/base/ftlcdfil.c:360:42: warning: argument 2 of type ‘FT_Vector *’ {aka ‘struct FT_Vector_ *’} declared as a pointer [-Warray-parameter=] 360 | FT_Vector* sub ) | ~~~~~~~~~~~~^~~ include/freetype/ftlcdfil.h:314:42: note: previously declared as an array ‘FT_Vector[3]’ {aka ‘struct FT_Vector_[3]’} 314 | FT_Vector sub[3] ); | ~~~~~~~~~~~~^~~~~~
gcc 11 has started doing more checks when functions are defined as taking arrays of a given length, which may help catch more buffer overflows: https://developers.redhat.com/articles/2021/06/25/use-source-level-annotations-help-gcc-detect-buffer-overflows#array_function_parameters -- -Alan Coopersmith- alan.coopersmith@oracle.com Oracle Solaris Engineering - https://blogs.oracle.com/alanc
[Prev in Thread] | Current Thread | [Next in Thread] |