/* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", storage_priv_src->hostname, read_size);
msg_host_t *m_host_list = NULL;
- m_host_list = calloc(2, sizeof(msg_host_t));
+ m_host_list = (msg_host_t*) calloc(2, sizeof(msg_host_t));
m_host_list[0] = MSG_host_self();
m_host_list[1] = attached_host;
/* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", storage_priv_src->hostname, size);
msg_host_t *m_host_list = NULL;
- m_host_list = calloc(2, sizeof(msg_host_t));
+ m_host_list = (msg_host_t*) calloc(2, sizeof(msg_host_t));
m_host_list[0] = MSG_host_self();
m_host_list[1] = attached_host;
msg_storage_priv_t storage_priv_src = MSG_storage_priv(storage_src);
msg_host_t attached_host = MSG_host_by_name(storage_priv_src->hostname);
int res = simcall_file_unlink(file_priv->simdata->smx_file, attached_host);
- return res;
+ return (msg_error_t) res;
}
/** \ingroup msg_file_management
msg_error_t MSG_file_seek(msg_file_t fd, sg_offset_t offset, int origin)
{
msg_file_priv_t priv = MSG_file_priv(fd);
- return simcall_file_seek(priv->simdata->smx_file, offset, origin);
+ return (msg_error_t) simcall_file_seek(priv->simdata->smx_file, offset, origin);
}
/**
msg_error_t MSG_file_move (msg_file_t fd, const char* fullpath)
{
msg_file_priv_t priv = MSG_file_priv(fd);
- return simcall_file_move(priv->simdata->smx_file, fullpath);
+ return (msg_error_t) simcall_file_move(priv->simdata->smx_file, fullpath);
}
/**
XBT_DEBUG("Initiate data transfer of %llu bytes between %s and %s.", read_size, storage_priv_src->hostname, host_name_dest);
msg_host_t *m_host_list = NULL;
- m_host_list = calloc(2, sizeof(msg_host_t));
+ m_host_list = (msg_host_t*) calloc(2, sizeof(msg_host_t));
m_host_list[0] = attached_host;
m_host_list[1] = host_dest;
if (transfer == MSG_TASK_CANCELED)
XBT_WARN("Transfer error, task has been canceled!");
- return -1;
+ return (msg_error_t) -1;
}
/* Create file on remote host, write it and close it */
*/
const char *MSG_storage_get_property_value(msg_storage_t storage, const char *name)
{
- return xbt_dict_get_or_null(MSG_storage_get_properties(storage), name);
+ return (char*) xbt_dict_get_or_null(MSG_storage_get_properties(storage), name);
}