summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2021-07-24 20:32:16 +0200
committerWerner Lemberg <wl@gnu.org>2021-07-24 20:32:16 +0200
commitc2fa51d9bd350c55427b62982bf464ffd5e0a068 (patch)
tree879980c78ed4d13a641aec2d744773f035c55119 /src/tools
parent28c2d7f31c0758e69dded02acfa32af080774e91 (diff)
downloadfreetype2-c2fa51d9bd350c55427b62982bf464ffd5e0a068.tar.gz
Fix some `cppcheck` warnings.
* src/bzip2/ftbzip2.c (ft_bzip2_file_skip_output), src/gzip/ftgzip.c (ft_gzip_file_skip_output): Reduce scope of `delta`. * src/psaux/psintrp.c, src/psaux/psintrp.h (cf2_interpT2CharString): Add `const` to `buf` parameter. * src/raster/ftraster.c (DelOld): Add `const` to `profile` parameter. (Vertical_Sweep_Span): Reduce scope of `target`. (FT_Outline_Get_CBox): Reduce scope of `xMin`, `xMax`, `yMin`, `yMax`. * src/smooth/ftgrays.c (gray_render_conic): Reduce scope of `split`. (gray_sweep, gray_sweep_direct): Reduce scope of `area`. * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Reduce scope of `temp`.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/apinames.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/apinames.c b/src/tools/apinames.c
index aeecf88d2..ff5380771 100644
--- a/src/tools/apinames.c
+++ b/src/tools/apinames.c
@@ -167,7 +167,6 @@ names_dump( FILE* out,
case OUTPUT_WATCOM_LBC:
{
const char* dot;
- char temp[512];
if ( !dll_name )
@@ -181,7 +180,8 @@ names_dump( FILE* out,
dot = strchr( dll_name, '.' );
if ( dot )
{
- int len = dot - dll_name;
+ char temp[512];
+ int len = dot - dll_name;
if ( len > (int)( sizeof ( temp ) - 1 ) )