[kaffe] CVS kaffe (robilad): small warning cleanup: native

Kaffe CVS cvs-commits at kaffe.org
Mon Mar 20 16:38:48 PST 2006


PatchSet 7158 
Date: 2006/03/21 00:24:06
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
 small warning cleanup: native

2006-03-21  Dalibor Topic  <robilad at kaffe.org>

* libraries/clib/native/ClassLoader.c (java_lang_VMClassLoader_defineClass):
Added private variable buf to clarify the code, and fix a compiler warning.

Members: 
	ChangeLog:1.4676->1.4677 
	libraries/clib/native/ClassLoader.c:1.51->1.52 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4676 kaffe/ChangeLog:1.4677
--- kaffe/ChangeLog:1.4676	Mon Mar 20 23:08:30 2006
+++ kaffe/ChangeLog	Tue Mar 21 00:24:06 2006
@@ -1,5 +1,10 @@
 2006-03-21  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/clib/native/ClassLoader.c (java_lang_VMClassLoader_defineClass): 
+	Added private variable buf to clarify the code, and fix a compiler warning.
+
+2006-03-21  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/clib/math/BigInteger.c (Java_java_math_BigInteger_assignString0): 
 	Changed type of str to const char * to match its use.
 
Index: kaffe/libraries/clib/native/ClassLoader.c
diff -u kaffe/libraries/clib/native/ClassLoader.c:1.51 kaffe/libraries/clib/native/ClassLoader.c:1.52
--- kaffe/libraries/clib/native/ClassLoader.c:1.51	Tue Dec 20 03:00:26 2005
+++ kaffe/libraries/clib/native/ClassLoader.c	Tue Mar 21 00:24:10 2006
@@ -66,16 +66,18 @@
 	classFile hand;
 	classEntry *centry;
 	errorInfo info;
+	const unsigned char* buf;
 
 	/* This is the error sent by JDK 1.4.2 */
 	if (length == 0)
 		SignalError("java.lang.ClassFormatError", "truncated class");
 	if (length < 0)
 		SignalError("java.lang.ArrayIndexOutOfBoundsException", "invalid data length"); 
+	buf = (const unsigned char*) &unhand_array(data)->body[offset];
 	classFileInit(&hand,
 		      NULL,
-		      &unhand_array(data)->body[offset],
-		      (unsigned) length,
+		      buf,
+		      (size_t) length,
 		      CP_BYTEARRAY);
 
 	clazz = newClass();




More information about the kaffe mailing list