(int) casts for cm_event_alloc and cm_analog_alloc
This commit is contained in:
parent
01566f2b49
commit
c9ba660155
|
|
@ -175,10 +175,10 @@ void cm_adc_bridge(ARGS)
|
|||
|
||||
|
||||
/* Allocate storage for inputs */
|
||||
cm_analog_alloc(0,size * sizeof(double));
|
||||
cm_analog_alloc(0, size * (int) sizeof(double));
|
||||
|
||||
/* Allocate storage for outputs */
|
||||
cm_event_alloc(1,size * sizeof(Digital_State_t));
|
||||
cm_event_alloc(1, size * (int) sizeof(Digital_State_t));
|
||||
|
||||
/* Get analog addresses */
|
||||
in = in_old = (double *) cm_analog_get_ptr(0,0);
|
||||
|
|
|
|||
|
|
@ -953,13 +953,13 @@ void cm_d_ram(ARGS)
|
|||
if(INIT) { /* initial pass */
|
||||
|
||||
/* allocate storage */
|
||||
cm_event_alloc(0,address_size * sizeof(Digital_State_t));
|
||||
cm_event_alloc(1,sizeof(Digital_State_t));
|
||||
cm_event_alloc(2,select_size * sizeof(Digital_State_t));
|
||||
cm_event_alloc(0, address_size * (int) sizeof(Digital_State_t));
|
||||
cm_event_alloc(1, (int) sizeof(Digital_State_t));
|
||||
cm_event_alloc(2, select_size * (int) sizeof(Digital_State_t));
|
||||
|
||||
|
||||
/* allocate storage for ram memory */
|
||||
cm_event_alloc(3,num_of_ram_ints * sizeof(short));
|
||||
cm_event_alloc(3, num_of_ram_ints * (int) sizeof(short));
|
||||
|
||||
/* declare load values */
|
||||
for (i=0; i<word_width; i++) {
|
||||
|
|
|
|||
|
|
@ -1094,9 +1094,9 @@ void cm_d_source(ARGS)
|
|||
modf( (PORT_SIZE(out) * i / 4), &double_dummy );
|
||||
dummy = double_dummy + 1;
|
||||
|
||||
cm_event_alloc(1,(dummy * sizeof(short)));
|
||||
cm_event_alloc(1, dummy * (int) sizeof(short));
|
||||
|
||||
cm_event_alloc(2,i * sizeof(double));
|
||||
cm_event_alloc(2, i * (int) sizeof(double));
|
||||
|
||||
|
||||
/**** Get all pointers again (to avoid realloc problems) ****/
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ void cm_dac_bridge(ARGS)
|
|||
|
||||
|
||||
/* Allocate storage for inputs */
|
||||
cm_event_alloc(0, size * sizeof(Digital_State_t));
|
||||
cm_event_alloc(0, size * (int) sizeof(Digital_State_t));
|
||||
|
||||
|
||||
/* Allocate storage for outputs */
|
||||
|
|
@ -215,7 +215,7 @@ void cm_dac_bridge(ARGS)
|
|||
/* allocate storage for analog output values. */
|
||||
|
||||
/* allocate output space and obtain adresses */
|
||||
cm_analog_alloc(0, size * sizeof(double));
|
||||
cm_analog_alloc(0, size * (int) sizeof(double));
|
||||
cm_analog_alloc(1, sizeof(double));
|
||||
|
||||
/* assign discrete addresses */
|
||||
|
|
|
|||
Loading…
Reference in New Issue