Commit cc7cab815c34aa34f8a6a3ba10703968836fd1e2

Werner Lemberg 2004-12-28T23:08:51

* builds/unix/ftsystem.c (FT_Stream_Open): Add proper cast for ft_alloc. Fix compiler warning.

diff --git a/ChangeLog b/ChangeLog
index 2b315e9..bbb5c98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,10 @@
 	* builds/unix/install-sh: Updated from
 	`texinfo' CVS module at subversions.gnu.org.
 
+	* builds/unix/ftsystem.c (FT_Stream_Open): Add proper cast for
+	ft_alloc.
+	Fix compiler warning.
+
 2004-12-27  Dirck Blaskey  <listtarget@danbala.com>
 
 	* src/cff/cffobjs.c (cff_face_init): Improve computation of
diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c
index c7a34ad..a3520a8 100644
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -285,7 +285,7 @@
       FT_ERROR(( "FT_Stream_Open:" ));
       FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
       
-      stream->base = ft_alloc( NULL, stream->size );
+      stream->base = (unsigned char*)ft_alloc( NULL, stream->size );
       
       if ( !stream->base )
       {
@@ -315,7 +315,7 @@
 
         total_read_count += read_count;
 
-      } while ( total_read_count != stream->size );
+      } while ( (unsigned long)total_read_count != stream->size );
 
       stream->close = ft_close_stream_by_free;
     }