ref: 8d8508e4d25eee31eef9c39bf790320bfd429d08
parent: dc624ca4dcac1cbfb6870414e6aaedba43aeb9ee
author: Werner Lemberg <[email protected]>
date: Tue Jun 4 09:09:01 EDT 2013
Missed some cppcheck items.
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,8 +4,18 @@
http://cppcheck.sourceforge.net/
+ The call was (from the top-level of the FreeType tree):
+
+ cppcheck --force \
+ --enable=all \
+ -I include \
+ -I include/freetype/ \
+ -I include/freetype/config/ \
+ -I include/freetype/internal/ \
+ . &> cppcheck.log
+
Note that the current version heavily chokes on FreeType, delivering
- even wrong results. I will report those issues to the cppcheck team
+ many wrong results. I will report those issues to the cppcheck team
so that a newer version gives improved results hopefully.
*/* Improve variable scopes.
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3188,7 +3188,7 @@
{
FT_CMap_Class clazz = cmap->clazz;
FT_Face face = cmap->charmap.face;
- FT_Memory memory = FT_FACE_MEMORY(face);
+ FT_Memory memory = FT_FACE_MEMORY( face );
if ( clazz->done )
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -2532,7 +2532,6 @@
if ( x2 - x1 < ras.precision )
{
Long e1, e2;
- Byte f1;
e1 = CEILING( x1 );
@@ -2540,6 +2539,7 @@
if ( e1 == e2 )
{
+ Byte f1;
PByte bits;
--- a/src/tools/test_trig.c
+++ b/src/tools/test_trig.c
@@ -23,11 +23,10 @@
for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 )
{
FT_Fixed f1, f2;
- double d1, d2;
+ double d2;
f1 = FT_Cos(i);
- d1 = f1/65536.0;
d2 = cos( i*SPI );
f2 = (FT_Fixed)(d2*65536.0);
@@ -50,11 +49,10 @@
for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 )
{
FT_Fixed f1, f2;
- double d1, d2;
+ double d2;
f1 = FT_Sin(i);
- d1 = f1/65536.0;
d2 = sin( i*SPI );
f2 = (FT_Fixed)(d2*65536.0);
@@ -77,11 +75,10 @@
for ( i = 0; i < FT_ANGLE_PI2-0x2000000; i += 0x10000 )
{
FT_Fixed f1, f2;
- double d1, d2;
+ double d2;
f1 = FT_Tan(i);
- d1 = f1/65536.0;
d2 = tan( i*SPI );
f2 = (FT_Fixed)(d2*65536.0);
@@ -211,7 +208,6 @@
FT_Fixed c2, s2, c4, s4;
FT_Vector v;
double l, a, c1, s1, c3, s3;
- int j;
l = 500.0;