Skip to content
Snippets Groups Projects
Commit 581a7059 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added some type casts to avoid compilation errors in C++.

Renamed the delete variable to avoid problems in C++.
parent 160f7bf2
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,7 @@ unsigned char dyn_manager_id_present(unsigned char num,unsigned char *ids,unsign
void dyn_manager_delete_op_single_master(TDynManager *manager,unsigned char master_index,OP_HANDLE *op)
{
unsigned char j,k,delete;
unsigned char j,k,del;
if(op->op_index[master_index]!=0xFF)
{
......@@ -197,11 +197,11 @@ void dyn_manager_delete_op_single_master(TDynManager *manager,unsigned char mast
else
op->op_index[master_index]=0xFF;
// remove handles
delete=0x01;
del=0x01;
for(j=0;j<manager->num_masters;j++)
if(op->op_index[j]!=0xFF)
delete=0x00;
if(delete==0x01)
del=0x00;
if(del==0x01)
{
op->op_type=no_op;
manager->num_ops--;
......@@ -470,14 +470,14 @@ OP_HANDLE *dyn_manager_single_op_new(TDynManager *manager,unsigned char mode,uns
if((op_handle=dyn_manager_get_free_op_handle(manager))==0x00000000)
return 0x00000000;
if(mode==DYN_MANAGER_READ || mode==DYN_MANAGER_WRITE)
op_handle->op_type=DYN_MANAGER_SINGLE|mode;
op_handle->op_type=(op_type_t)(DYN_MANAGER_SINGLE|mode);
else
return 0x00000000;
current_op_index=manager->operations[master_index].num_single_op;
if(current_op_index<DYN_MANAGER_MAX_NUM_SINGLE_OP)
{
current_op=&manager->operations[master_index].single_op[current_op_index];
current_op->common.operation=DYN_MANAGER_SINGLE|mode;
current_op->common.operation=(op_type_t)(DYN_MANAGER_SINGLE|mode);
current_op->common.op_handle=op_handle;
current_op->id=id;
current_op->address=address;
......@@ -549,7 +549,7 @@ OP_HANDLE *dyn_manager_sync_op_new(TDynManager *manager,unsigned char mode,unsig
if((op_handle=dyn_manager_get_free_op_handle(manager))==0x00000000)
return 0x00000000;
if(mode==DYN_MANAGER_READ || mode==DYN_MANAGER_WRITE)
op_handle->op_type=DYN_MANAGER_SYNC|mode;
op_handle->op_type=(op_type_t)(DYN_MANAGER_SYNC|mode);
else
return 0x00000000;
for(i=0;i<num;i++)
......@@ -568,7 +568,7 @@ OP_HANDLE *dyn_manager_sync_op_new(TDynManager *manager,unsigned char mode,unsig
if(dyn_manager_id_present(current_op->num_devices,current_op->ids,ids[i])==0x00)
{
op_handle->op_index[master_index]=current_op_index;
current_op->common.operation=DYN_MANAGER_SYNC|mode;
current_op->common.operation=(op_type_t)(DYN_MANAGER_SYNC|mode);
current_op->common.op_handle=op_handle;
current_op->address=address;
current_op->length=length;
......@@ -713,7 +713,7 @@ OP_HANDLE *dyn_manager_bulk_op_new(TDynManager *manager,unsigned char mode,unsig
if((op_handle=dyn_manager_get_free_op_handle(manager))==0x00000000)
return 0x00000000;
if(mode==DYN_MANAGER_READ || mode==DYN_MANAGER_WRITE)
op_handle->op_type=DYN_MANAGER_BULK|mode;
op_handle->op_type=(op_type_t)(DYN_MANAGER_BULK|mode);
else
return 0x00000000;
for(i=0;i<num;i++)
......@@ -732,7 +732,7 @@ OP_HANDLE *dyn_manager_bulk_op_new(TDynManager *manager,unsigned char mode,unsig
if(dyn_manager_id_present(current_op->num_devices,current_op->ids,ids[i])==0x00)
{
op_handle->op_index[master_index]=current_op_index;
current_op->common.operation=DYN_MANAGER_BULK|mode;
current_op->common.operation=(op_type_t)(DYN_MANAGER_BULK|mode);
current_op->common.op_handle=op_handle;
current_op->address[current_op->num_devices]=address[i];
current_op->length[current_op->num_devices]=length[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment