Missed some cppcheck items.

This commit is contained in:
Werner Lemberg 2013-06-04 13:09:01 +02:00
parent dc624ca4dc
commit 8d8508e4d2
4 changed files with 16 additions and 10 deletions

View File

@ -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.

View File

@ -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 )

View File

@ -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;

View File

@ -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;