Commit 1f377f0d50a6a4bdf2a4985a010af0403925681f

Werner Lemberg 2015-02-16T08:37:09

* src/base/ftsystem.c: Use casts in standard C function wrappers. (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.

diff --git a/ChangeLog b/ChangeLog
index 8f835ca..fa69973 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-02-16  Werner Lemberg  <wl@gnu.org>
 
+	* src/base/ftsystem.c: Use casts in standard C function wrappers.
+	(ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
 	Fix Savannah bug #44261.
 
 	* builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c
index 10e245d..5809a59 100644
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -71,7 +71,7 @@
   {
     FT_UNUSED( memory );
 
-    return ft_smalloc( size );
+    return ft_smalloc( (size_t)size );
   }
 
 
@@ -104,7 +104,7 @@
     FT_UNUSED( memory );
     FT_UNUSED( cur_size );
 
-    return ft_srealloc( block, new_size );
+    return ft_srealloc( block, (size_t)new_size );
   }
 
 
@@ -212,7 +212,7 @@
     file = STREAM_FILE( stream );
 
     if ( stream->pos != offset )
-      ft_fseek( file, offset, SEEK_SET );
+      ft_fseek( file, (long)offset, SEEK_SET );
 
     return (unsigned long)ft_fread( buffer, 1, count, file );
   }
@@ -247,7 +247,7 @@
     }
 
     ft_fseek( file, 0, SEEK_END );
-    stream->size = ft_ftell( file );
+    stream->size = (unsigned long)ft_ftell( file );
     if ( !stream->size )
     {
       FT_ERROR(( "FT_Stream_Open:" ));