Clang-Tidy warning fixes. * src/base/ftobjs.c (FT_Get_Paint): Operator has equivalent nested operands. * src/bdf/bdflib.c (_bdf_add_property): Value stored to `fp` is never read. * src/sdf/ftbsdf.c (bsdf_init_distance_map): Value stored to `pixel` is never read. * src/sdf/ftsdf.c (split_sdf_shape): Value stored to `error` is never read.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 883f1a8..f5eee78 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -5729,7 +5729,7 @@
SFNT_Service sfnt;
- if ( !face || !paint || !paint )
+ if ( !face || !paint )
return 0;
if ( !FT_IS_SFNT( face ) )
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index e317bdd..86ebe60 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1174,7 +1174,6 @@
font->props_size + 1 ) )
goto Exit;
- fp = font->props + font->props_size;
font->props_size++;
}
diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c
index 8da5c9d..e1856e2 100644
--- a/src/sdf/ftbsdf.c
+++ b/src/sdf/ftbsdf.c
@@ -756,8 +756,6 @@
byte = (FT_Byte)( 1 << mod );
t[t_index].alpha = pixel & byte ? 255 : 0;
-
- pixel = 0;
}
}
}
diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c
index f69cf49..00e21fe 100644
--- a/src/sdf/ftsdf.c
+++ b/src/sdf/ftsdf.c
@@ -1277,9 +1277,11 @@
default:
error = FT_THROW( Invalid_Argument );
- goto Exit;
}
+ if ( error != FT_Err_Ok )
+ goto Exit;
+
edges = edges->next;
}