Commit 3e86711ebf6efdea405f8f35bc34baf737b744df

Werner Lemberg 2014-11-25T09:01:07

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

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
   )