[kaffe] CVS kaffe (robilad): Small warning fixes in jar.c

Kaffe CVS cvs-commits at kaffe.org
Mon Oct 11 22:23:58 PDT 2004


PatchSet 5277 
Date: 2004/10/12 05:20:01
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Small warning fixes in jar.c

2004-10-12  Dalibor Topic <robilad at kaffe.org>

        * kaffe/kaffevm/jar.c (initJarEntry, getCentralDirCount,
        getDataJarFile, openJarFile): Cast second parameter of
        jarSeek to off_t to fix warnings on platforms with
        long offset support.

Members: 
	ChangeLog:1.2829->1.2830 
	kaffe/kaffevm/jar.c:1.31->1.32 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2829 kaffe/ChangeLog:1.2830
--- kaffe/ChangeLog:1.2829	Tue Oct 12 04:59:28 2004
+++ kaffe/ChangeLog	Tue Oct 12 05:20:01 2004
@@ -1,5 +1,12 @@
 2004-10-12  Dalibor Topic <robilad at kaffe.org>
 
+	* kaffe/kaffevm/jar.c (initJarEntry, getCentralDirCount,
+	getDataJarFile, openJarFile): Cast second parameter of
+	jarSeek to off_t to fix warnings on platforms with 
+	long offset support.
+
+2004-10-12  Dalibor Topic <robilad at kaffe.org>
+
 	* kaffe/kaffevm/jar.c (jarSeek): Don't inline.
 	Fixes gcc warnings on ix86-linux.
 
Index: kaffe/kaffe/kaffevm/jar.c
diff -u kaffe/kaffe/kaffevm/jar.c:1.31 kaffe/kaffe/kaffevm/jar.c:1.32
--- kaffe/kaffe/kaffevm/jar.c:1.31	Tue Oct 12 04:59:29 2004
+++ kaffe/kaffe/kaffevm/jar.c	Tue Oct 12 05:20:04 2004
@@ -737,7 +737,7 @@
 			 * record, if there is one.
 			 */
 			if( jarSeek(jf,
-				    cdr.extraFieldLength +
+				    (off_t)cdr.extraFieldLength +
 				    cdr.fileCommentLength,
 				    SEEK_CUR) > 0 )
 			{
@@ -768,7 +768,7 @@
 	assert(out_dir_size != 0);
 	
 	/* The central directory end is at the end of the file */
-	if( (pos = jarSeek(jf, -FILE_SIZEOF_CENTRALEND, SEEK_END)) > 0 )
+	if( (pos = jarSeek(jf, (off_t)-FILE_SIZEOF_CENTRALEND, SEEK_END)) > 0 )
 	{
 		jarCentralDirectoryEnd cde;
 
@@ -957,7 +957,7 @@
 		jarInstantiate(jf, (uint8 *)&lh, instantiateLocalHeader);
 		/* Skip the local file name and extra fields */
 		jarSeek(jf,
-			lh.fileNameLength + lh.extraFieldLength,
+			(off_t)lh.fileNameLength + lh.extraFieldLength,
 			SEEK_CUR);
 		/* Allocate some memory and read in the file data */
 		if( (buf = (uint8 *)gc_malloc(je->compressedSize,
@@ -1121,7 +1121,7 @@
 							    PROT_READ,
 							    MAP_SHARED,
 							    retval->fd,
-							    0);
+							    (off_t)0);
 					if( retval->data == MAP_FAILED )
 					{
 						/*



More information about the kaffe mailing list