diff --git a/ChangeLog b/ChangeLog index e43dd09b9..ef168a5c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-11-06 Robert Larice + * src/xspice/idn/idndig.c : + change a (int) cast application, to avoid type conversion warnings + 2010-11-06 Robert Larice * src/frontend/help/readhelp.c : tiny rewrite, to avoid type conversion warnings diff --git a/src/xspice/idn/idndig.c b/src/xspice/idn/idndig.c index 45a15c37c..4afefcf00 100755 --- a/src/xspice/idn/idndig.c +++ b/src/xspice/idn/idndig.c @@ -150,15 +150,15 @@ static void idn_digital_resolve(int num_struct, dig_struct->strength = dig_struct_array[0]->strength; /* Convert struct to index into map */ - index1 = dig_struct->state + ((int)dig_struct->strength) * 3; + index1 = (int) (dig_struct->state + dig_struct->strength * 3); /* For the remaining members, perform the resolution algorithm */ for(i = 1; i < num_struct; i++) { /* Convert struct to index into map */ - index2 = dig_struct_array[i]->state + - ((int)dig_struct_array[i]->strength) * 3; + index2 = (int)(dig_struct_array[i]->state + + dig_struct_array[i]->strength * 3); /* Compute the result */ index1 = map[index1][index2]; @@ -305,7 +305,7 @@ static void idn_digital_print_val(void *evt_struct, char *member, char **val) } } else { - index = dig_struct->state + ((int)dig_struct->strength) * 3; + index = (int)(dig_struct->state + dig_struct->strength * 3); if((index < 0) || (index > 11)) *val = "??"; else