From 3d4fcecf7663d1b88bdc01d069fc8c047c5dec67 Mon Sep 17 00:00:00 2001 From: cherierm Date: Fri, 16 Mar 2007 15:11:01 +0000 Subject: [PATCH] with ansi C the variables must be declared at the begining of the function git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3307 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/msg/ping_pong.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/msg/ping_pong.c b/examples/msg/ping_pong.c index c241c9a9c8..ef92c54f3d 100644 --- a/examples/msg/ping_pong.c +++ b/examples/msg/ping_pong.c @@ -30,7 +30,7 @@ double task_comm_size_bw = 100000000; /** Emitter function */ int sender(int argc,char *argv[] ) -{INFO0("sender"); +{ int nbr = 0; m_host_t *hosts = NULL; int i; @@ -38,6 +38,8 @@ int sender(int argc,char *argv[] ) double task_comp_size = 0; m_task_t task=NULL; char sprintf_buffer[64]; + + INFO0("sender"); nbr = argc - 1; hosts = calloc(nbr, sizeof(m_host_t)); @@ -81,8 +83,10 @@ int sender(int argc,char *argv[] ) /** Receiver function */ int receiver(int argc, char *argv[]) { - INFO0("receiver"); + double communication_time=0; + + INFO0("receiver"); while(1) { double time, time1, sender_time; @@ -119,8 +123,10 @@ int receiver(int argc, char *argv[]) MSG_error_t test_all(const char *platform_file, const char *application_file) { - INFO0("test_all"); - MSG_error_t res = MSG_OK; + + MSG_error_t res = MSG_OK; + + INFO0("test_all"); /* Simulation setting */ MSG_set_channel_number(MAX_CHANNEL); MSG_paje_output("msg_test.trace"); -- 2.20.1