[Savannah bug #43682] Adjust some renderer callbacks. * src/raster/ftraster.c (ft_black_set_mode): Change return type to `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype. * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function for orthogonality. (ft_grays_raster): Use it.
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
diff --git a/ChangeLog b/ChangeLog
index 4b846ba..93ee74e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2014-11-24 Werner Lemberg <wl@gnu.org>
+ [Savannah bug #43682] Adjust some renderer callbacks.
+
+ * src/raster/ftraster.c (ft_black_set_mode): Change return type to
+ `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype.
+
+ * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function
+ for orthogonality.
+ (ft_grays_raster): Use it.
+
+2014-11-24 Werner Lemberg <wl@gnu.org>
+
[Savannah bug #43682] Properly handle missing return errors.
The functions in this patch *do* return non-trivial errors that must
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index b4b9393..b06ac33 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -3542,7 +3542,7 @@
}
- static void
+ static int
ft_black_set_mode( black_PRaster raster,
unsigned long mode,
const char* palette )
@@ -3566,6 +3566,8 @@
FT_UNUSED( palette );
#endif
+
+ return 0;
}
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 94c5462..9283326 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -2097,12 +2097,26 @@ typedef ptrdiff_t FT_PtrDist;
}
+ static int
+ gray_raster_set_mode( FT_Raster raster,
+ unsigned long mode,
+ void* args )
+ {
+ FT_UNUSED( raster );
+ FT_UNUSED( mode );
+ FT_UNUSED( args );
+
+
+ return 0; /* nothing to do */
+ }
+
+
FT_DEFINE_RASTER_FUNCS(ft_grays_raster,
FT_GLYPH_FORMAT_OUTLINE,
(FT_Raster_New_Func) gray_raster_new,
(FT_Raster_Reset_Func) gray_raster_reset,
- (FT_Raster_Set_Mode_Func)0,
+ (FT_Raster_Set_Mode_Func)gray_raster_set_mode,
(FT_Raster_Render_Func) gray_raster_render,
(FT_Raster_Done_Func) gray_raster_done
)