change a (int) cast application, to avoid type conversion warnings
This commit is contained in:
parent
8141892f72
commit
fbe0def68e
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue