Remove variables that are obviously not used. Caught with gcc 4.6
and -Wunused-but-set-variable.
15 files changed:
int slave(int argc, char *argv[])
{
m_task_t task = NULL;
int slave(int argc, char *argv[])
{
m_task_t task = NULL;
- res = MSG_task_receive(&(task), "master_mailbox");
+ MSG_task_receive(&(task), "master_mailbox");
if (!strcmp(MSG_task_get_name(task), "finalize")) {
MSG_task_destroy(task);
if (!strcmp(MSG_task_get_name(task), "finalize")) {
MSG_task_destroy(task);
int slave(int argc, char *argv[])
{
m_task_t task = NULL;
int slave(int argc, char *argv[])
{
m_task_t task = NULL;
TRACE_host_variable_set(MSG_host_self()->name, "is_slave", 1);
while (1) {
TRACE_host_variable_set(MSG_host_self()->name, "is_slave", 1);
while (1) {
- res = MSG_task_receive(&(task), "master_mailbox");
+ MSG_task_receive(&(task), "master_mailbox");
if (!strcmp(MSG_task_get_name(task), "finalize")) {
MSG_task_destroy(task);
if (!strcmp(MSG_task_get_name(task), "finalize")) {
MSG_task_destroy(task);
SD_task_t parent, grand_parent;
xbt_dynar_t parents, grand_parents;
SD_task_t parent, grand_parent;
xbt_dynar_t parents, grand_parents;
- int grand_parent_nworkstations;
SD_workstation_t *grand_parent_workstation_list;
parents = SD_task_get_parents(task);
SD_workstation_t *grand_parent_workstation_list;
parents = SD_task_get_parents(task);
}
xbt_dynar_get_cpy(grand_parents, 0, &grand_parent);
}
xbt_dynar_get_cpy(grand_parents, 0, &grand_parent);
- grand_parent_nworkstations =
- SD_task_get_workstation_count(grand_parent);
grand_parent_workstation_list =
SD_task_get_workstation_list(grand_parent);
/* Estimate the redistribution time from this parent */
grand_parent_workstation_list =
SD_task_get_workstation_list(grand_parent);
/* Estimate the redistribution time from this parent */
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
- unsigned int cursor, selected_idx = 0;
double finish_time, min_finish_time = -1.0;
SD_task_t task, selected_task = NULL;
xbt_dynar_t ready_tasks;
double finish_time, min_finish_time = -1.0;
SD_task_t task, selected_task = NULL;
xbt_dynar_t ready_tasks;
min_finish_time = finish_time;
selected_task = task;
selected_workstation = workstation;
min_finish_time = finish_time;
selected_task = task;
selected_workstation = workstation;
XBT_INFO("Exiting GRAS");
amok_exit();
gras_moddata_leave();
XBT_INFO("Exiting GRAS");
amok_exit();
gras_moddata_leave();
- pd = gras_procdata_get();
gras_msg_listener_shutdown();
gras_process_exit();
if (--gras_running_process == 0) {
gras_msg_listener_shutdown();
gras_process_exit();
if (--gras_running_process == 0) {
MPI_Datatype recvtype, MPI_Comm comm)
{
int system_tag = 666;
MPI_Datatype recvtype, MPI_Comm comm)
{
int system_tag = 666;
- int rank, size, other, index, sendsize, recvsize;
+ int rank, size, other, index, sendsize;
MPI_Request *requests;
rank = smpi_comm_rank(comm);
size = smpi_comm_size(comm);
sendsize = smpi_datatype_size(sendtype);
MPI_Request *requests;
rank = smpi_comm_rank(comm);
size = smpi_comm_size(comm);
sendsize = smpi_datatype_size(sendtype);
- recvsize = smpi_datatype_size(recvtype);
// Local copy from self
memcpy(&((char *) recvbuf)[displs[rank]], sendbuf,
sendcount * sendsize * sizeof(char));
// Local copy from self
memcpy(&((char *) recvbuf)[displs[rank]], sendbuf,
sendcount * sendsize * sizeof(char));
MPI_Datatype recvtype, int root, MPI_Comm comm)
{
int system_tag = 666;
MPI_Datatype recvtype, int root, MPI_Comm comm)
{
int system_tag = 666;
- int rank, size, dst, index, sendsize, recvsize;
+ int rank, size, dst, index, recvsize;
MPI_Request *requests;
rank = smpi_comm_rank(comm);
MPI_Request *requests;
rank = smpi_comm_rank(comm);
smpi_mpi_recv(recvbuf, recvcount, recvtype, root, system_tag, comm,
MPI_STATUS_IGNORE);
} else {
smpi_mpi_recv(recvbuf, recvcount, recvtype, root, system_tag, comm,
MPI_STATUS_IGNORE);
} else {
- sendsize = smpi_datatype_size(sendtype);
recvsize = smpi_datatype_size(recvtype);
// Local copy from root
memcpy(recvbuf, &((char *) sendbuf)[displs[root]],
recvsize = smpi_datatype_size(recvtype);
// Local copy from root
memcpy(recvbuf, &((char *) sendbuf)[displs[root]],
xbt_swag_t cnst_list = NULL;
xbt_swag_t var_list = NULL;
xbt_swag_t elem_list = NULL;
xbt_swag_t cnst_list = NULL;
xbt_swag_t var_list = NULL;
xbt_swag_t elem_list = NULL;
int i;
static s_xbt_swag_t cnst_to_update;
int i;
static s_xbt_swag_t cnst_to_update;
}
XBT_DEBUG("******* Constraints to process: %d *******",
xbt_swag_size(cnst_list));
}
XBT_DEBUG("******* Constraints to process: %d *******",
xbt_swag_size(cnst_list));
xbt_swag_foreach_safe(cnst, cnst_next, cnst_list) {
int nb = 0;
XBT_DEBUG("Processing cnst %p ", cnst);
xbt_swag_foreach_safe(cnst, cnst_next, cnst_list) {
int nb = 0;
XBT_DEBUG("Processing cnst %p ", cnst);
current_src = xbt_dynar_get_ptr(path_src, index_src);
current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
current_src = xbt_dynar_get_ptr(path_src, index_src);
current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
- routing_component_t *tmp_src, *tmp_dst;
- tmp_src = xbt_dynar_pop_ptr(path_src);
- tmp_dst = xbt_dynar_pop_ptr(path_dst);
+ xbt_dynar_pop_ptr(path_src);
+ xbt_dynar_pop_ptr(path_dst);
index_src--;
index_dst--;
current_src = xbt_dynar_get_ptr(path_src, index_src);
index_src--;
index_dst--;
current_src = xbt_dynar_get_ptr(path_src, index_src);
}
/* compose route path with links */
}
/* compose route path with links */
- char *gw_src = NULL, *gw_dst =
- NULL, *prev_gw_src, *prev_gw_dst, *first_gw = NULL;
+ char *gw_src = NULL, *gw_dst = NULL, *prev_gw_src, *first_gw = NULL;
for (v = dst_node_id; v != src_node_id; v = pred_arr[v]) {
xbt_node_t node_pred_v =
for (v = dst_node_id; v != src_node_id; v = pred_arr[v]) {
xbt_node_t node_pred_v =
*dst_id);
prev_gw_src = gw_src;
*dst_id);
prev_gw_src = gw_src;
e_route = (route_extended_t) xbt_graph_edge_get_data(edge);
gw_src = e_route->src_gateway;
e_route = (route_extended_t) xbt_graph_edge_get_data(edge);
gw_src = e_route->src_gateway;
int first = 1;
int pred = *dst_id;
int prev_pred = 0;
int first = 1;
int pred = *dst_id;
int prev_pred = 0;
- char *gw_src = NULL, *gw_dst =
- NULL, *prev_gw_src, *prev_gw_dst, *first_gw = NULL;
+ char *gw_src = NULL, *gw_dst = NULL, *prev_gw_src, *first_gw = NULL;
unsigned int cpt;
void *link;
xbt_dynar_t links;
unsigned int cpt;
void *link;
xbt_dynar_t links;
dst);
prev_gw_src = gw_src;
dst);
prev_gw_src = gw_src;
route_extended_t e_route = TO_FLOYD_LINK(pred, prev_pred);
gw_src = e_route->src_gateway;
route_extended_t e_route = TO_FLOYD_LINK(pred, prev_pred);
gw_src = e_route->src_gateway;
XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
{
xbt_dict_t head = NULL;
XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
{
xbt_dict_t head = NULL;
SIZEOFKEY);
head = xbt_dict_new();
/* if (i%10) printf("."); else printf("%d",i/10); fflush(stdout); */
SIZEOFKEY);
head = xbt_dict_new();
/* if (i%10) printf("."); else printf("%d",i/10); fflush(stdout); */
for (j = 0; j < 1000; j++) {
char *data = NULL;
key = xbt_malloc(SIZEOFKEY);
for (j = 0; j < 1000; j++) {
char *data = NULL;
key = xbt_malloc(SIZEOFKEY);
xbt_node_t source = xbt_dict_get (nodes_dict, node_source);
xbt_node_t target = xbt_dict_get (nodes_dict, node_target);
xbt_node_t source = xbt_dict_get (nodes_dict, node_source);
xbt_node_t target = xbt_dict_get (nodes_dict, node_target);
- xbt_edge_t e;
- e = xbt_graph_new_edge (ret, source, target, xbt_strdup(edge_id));
+ xbt_graph_new_edge (ret, source, target, xbt_strdup(edge_id));
}
xbt_dict_free (&nodes_dict);
return ret;
}
xbt_dict_free (&nodes_dict);
return ret;
void xbt_event_end(xbt_event_t event)
{
void xbt_event_end(xbt_event_t event)
{
mycount = __sync_add_and_fetch(&event->thread_counter, 1);
if(mycount == event->threads_to_wait){
event->done++;
mycount = __sync_add_and_fetch(&event->thread_counter, 1);
if(mycount == event->threads_to_wait){
event->done++;
gras_socket_t me = NULL, pal = NULL;
int myport;
char *palstr;
gras_socket_t me = NULL, pal = NULL;
int myport;
char *palstr;
gras_init(&argc, argv);
xbt_assert(argc == 3, "Usage: client <myport> <server>");
gras_init(&argc, argv);
xbt_assert(argc == 3, "Usage: client <myport> <server>");
XBT_INFO("Initialization done.");
/* Launch handle(-1). Lock until message from server expected */
XBT_INFO("Initialization done.");
/* Launch handle(-1). Lock until message from server expected */
TRY {
gras_msg_handle(-1);
} CATCH(e) {
TRY {
gras_msg_handle(-1);
} CATCH(e) {
surf_action_t actionA = NULL;
surf_action_t actionB = NULL;
surf_action_t actionC = NULL;
surf_action_t actionA = NULL;
surf_action_t actionB = NULL;
surf_action_t actionC = NULL;
- surf_action_t commAB = NULL;
e_surf_action_state_t stateActionA;
e_surf_action_state_t stateActionB;
e_surf_action_state_t stateActionC;
e_surf_action_state_t stateActionA;
e_surf_action_state_t stateActionB;
e_surf_action_state_t stateActionC;
XBT_DEBUG("%s : %p", surf_resource_name(cardB), cardB);
/* Let's do something on it */
XBT_DEBUG("%s : %p", surf_resource_name(cardB), cardB);
/* Let's do something on it */
- commAB =
- surf_network_model->extension.network.communicate("Cpu A", "Cpu B",
- 150.0, -1.0);
+ surf_network_model->extension.network.communicate("Cpu A", "Cpu B",
+ 150.0, -1.0);
surf_solve(-1.0); /* Takes traces into account. Returns 0.0 */
do {
surf_solve(-1.0); /* Takes traces into account. Returns 0.0 */
do {
{
void *workstationA = NULL;
void *workstationB = NULL;
{
void *workstationA = NULL;
void *workstationB = NULL;
- surf_action_t actionA = NULL;
- surf_action_t actionB = NULL;
- surf_action_t actionC = NULL;
- surf_action_t commAB = NULL;
double now = -1.0;
int running;
double now = -1.0;
int running;
XBT_DEBUG("%s : %p", surf_resource_name(workstationB), workstationB);
/* Let's do something on it */
XBT_DEBUG("%s : %p", surf_resource_name(workstationB), workstationB);
/* Let's do something on it */
- actionA =
- surf_workstation_model->extension.workstation.execute(workstationA,
- 1000.0);
- actionB =
- surf_workstation_model->extension.workstation.execute(workstationB,
- 1000.0);
- actionC =
- surf_workstation_model->extension.workstation.sleep(workstationB,
- 7.32);
-
- commAB =
- surf_workstation_model->extension.workstation.
+ surf_workstation_model->extension.workstation.execute(workstationA, 1000.0);
+ surf_workstation_model->extension.workstation.execute(workstationB, 1000.0);
+ surf_workstation_model->extension.workstation.sleep(workstationB, 7.32);
+
+ surf_workstation_model->extension.workstation.
communicate(workstationA, workstationB, 150.0, -1.0);
surf_solve(-1.0); /* Takes traces into account. Returns 0.0 */
communicate(workstationA, workstationB, 150.0, -1.0);
surf_solve(-1.0); /* Takes traces into account. Returns 0.0 */