* src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
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
diff --git a/ChangeLog b/ChangeLog
index 75708e1..f786a8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-09-02 Werner Lemberg <wl@gnu.org>.
+
+ * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
+
2016-09-02 Werner Lemberg <wl@gnu.org>
Some preparations for the next release.
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 0b2f0c2..f5cf7af 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1319,6 +1319,7 @@ typedef ptrdiff_t FT_PtrDist;
unsigned char* q = ras.target.origin -
ras.target.pitch * ( y + ras.min_ey ) +
x + ras.min_ex;
+ unsigned char c = (unsigned char)coverage;
/* For small-spans it is faster to do it by ourselves than
@@ -1327,16 +1328,16 @@ typedef ptrdiff_t FT_PtrDist;
*/
switch ( acount )
{
- case 7: *q++ = coverage;
- case 6: *q++ = coverage;
- case 5: *q++ = coverage;
- case 4: *q++ = coverage;
- case 3: *q++ = coverage;
- case 2: *q++ = coverage;
- case 1: *q = coverage;
+ case 7: *q++ = c;
+ case 6: *q++ = c;
+ case 5: *q++ = c;
+ case 4: *q++ = c;
+ case 3: *q++ = c;
+ case 2: *q++ = c;
+ case 1: *q = c;
case 0: break;
default:
- FT_MEM_SET( q, coverage, acount );
+ FT_MEM_SET( q, c, acount );
}
}
}