harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arc...@apache.org
Subject svn commit: r367057 - in /incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc: cf_parse.c properties.c
Date Sun, 08 Jan 2006 18:10:23 GMT
Author: archie
Date: Sun Jan  8 10:10:21 2006
New Revision: 367057

URL: http://svn.apache.org/viewcvs?rev=367057&view=rev
Log:
Fix compiler warnings.

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/cf_parse.c
    incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/properties.c

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/cf_parse.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/cf_parse.c?rev=367057&r1=367056&r2=367057&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/cf_parse.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/cf_parse.c Sun Jan
 8 10:10:21 2006
@@ -1304,12 +1304,16 @@
 		break;
 	case _JC_jsr_w:
 	case _JC_goto_w:
+	    {
+		jint value32;
+
 		_JC_ASSERT(_JC_jsr_w - _JC_jsr == _JC_goto_w - _JC_goto);
 		insn->opcode -= _JC_jsr_w - _JC_jsr;
-		if (_jc_parse_integer(s, &insn->u.branch.target) != JNI_OK)
+		if (_jc_parse_integer(s, &value32) != JNI_OK)
 			return JNI_ERR;
-		insn->u.branch.target += insn_offset;
+		insn->u.branch.target = insn_offset + value32;
 		break;
+	    }
 	case _JC_iinc:
 		if (_jc_parse_local8(s, code, &insn->u.iinc.index) != JNI_OK)
 			return JNI_ERR;
@@ -1360,6 +1364,7 @@
 		_jc_cf_lookupswitch *lsw;
 		_jc_uint32 default_target;
 		jint num_pairs;
+		jint value32;
 		int pad;
 
 		/* Parse padding */
@@ -1375,9 +1380,9 @@
 		}
 
 		/* Parse default target offset */
-		if (_jc_parse_integer(s, &default_target) != JNI_OK)
+		if (_jc_parse_integer(s, &value32) != JNI_OK)
 			return JNI_ERR;
-		default_target += insn_offset;
+		default_target = insn_offset + value32;
 
 		/* Parse number of pairs */
 		if (_jc_parse_integer(s, &num_pairs) != JNI_OK)
@@ -1407,9 +1412,9 @@
 				    "misordered %s table", opname);
 				return JNI_ERR;
 			}
-			if (_jc_parse_integer(s, &lookup->target) != JNI_OK)
+			if (_jc_parse_integer(s, &value32) != JNI_OK)
 				return JNI_ERR;
-			lookup->target += insn_offset;
+			lookup->target = insn_offset + value32;
 		}
 		break;
 	    }
@@ -1419,6 +1424,7 @@
 		_jc_cf_tableswitch *tsw;
 		_jc_uint32 default_target;
 		jint num_targets;
+		jint value32;
 		jint high;
 		jint low;
 		int pad;
@@ -1436,9 +1442,9 @@
 		}
 
 		/* Parse default target offset */
-		if (_jc_parse_integer(s, &default_target) != JNI_OK)
+		if (_jc_parse_integer(s, &value32) != JNI_OK)
 			return JNI_ERR;
-		default_target += insn_offset;
+		default_target = insn_offset + value32;
 
 		/* Parse bounds */
 		if (_jc_parse_integer(s, &low) != JNI_OK)
@@ -1463,9 +1469,9 @@
 
 		/* Parse targets */
 		for (i = 0; i < num_targets; i++) {
-			if (_jc_parse_integer(s, &tsw->targets[i]) != JNI_OK)
+			if (_jc_parse_integer(s, &value32) != JNI_OK)
 				return JNI_ERR;
-			tsw->targets[i] += insn_offset;
+			tsw->targets[i] = insn_offset + value32;
 		}
 		break;
 	    }

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/properties.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/properties.c?rev=367057&r1=367056&r2=367057&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/properties.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/properties.c Sun
Jan  8 10:10:21 2006
@@ -233,7 +233,7 @@
 {
 	_jc_jvm *const vm = env->vm;
 	_jc_property *prop;
-	size_t loader_size;
+	size_t size;
 	int i;
 
 	/* Sort properties for faster searching */
@@ -278,8 +278,9 @@
 		return JNI_ERR;
 	prop = _jc_property_get(vm, "jc.java.stack.size");
 	_JC_ASSERT(prop != NULL);
-	if (_jc_digest_size(env, &vm->java_stack_size, prop, 0) != JNI_OK)
+	if (_jc_digest_size(env, &size, prop, 0) != JNI_OK)
 		return JNI_ERR;
+	vm->java_stack_size = size;
 
 	/* Get heap size and granularity factor */
 	prop = _jc_property_get(vm, "jc.heap.size");
@@ -288,13 +289,14 @@
 		return JNI_ERR;
 	prop = _jc_property_get(vm, "jc.heap.granularity");
 	_JC_ASSERT(prop != NULL);
-	if (_jc_digest_size(env, &vm->heap.granularity, prop, 99) != JNI_OK)
+	if (_jc_digest_size(env, &size, prop, 99) != JNI_OK)
 		return JNI_ERR;
+	vm->heap.granularity = size;
 	prop = _jc_property_get(vm, "jc.loader.size");
 	_JC_ASSERT(prop != NULL);
-	if (_jc_digest_size(env, &loader_size, prop, 0) != JNI_OK)
+	if (_jc_digest_size(env, &size, prop, 0) != JNI_OK)
 		return JNI_ERR;
-	vm->max_loader_pages = _JC_HOWMANY(loader_size, _JC_PAGE_SIZE);
+	vm->max_loader_pages = _JC_HOWMANY(size, _JC_PAGE_SIZE);
 	vm->avail_loader_pages = vm->max_loader_pages;
 
 	/* Check stack parameters */



Mime
View raw message