From d282280b34c91d82c661c9b569bc0147da4662e3 Mon Sep 17 00:00:00 2001 From: cherierm Date: Fri, 16 Mar 2007 14:11:15 +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@3302 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- testsuite/surf/maxmin_usage.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/testsuite/surf/maxmin_usage.c b/testsuite/surf/maxmin_usage.c index d2946dc08b..f1bc8b69cf 100644 --- a/testsuite/surf/maxmin_usage.c +++ b/testsuite/surf/maxmin_usage.c @@ -148,6 +148,17 @@ void test3(method_t method) int j = 0; double **A; + + lmm_system_t Sys = NULL ; + lmm_constraint_t *tmp_cnst = NULL; + lmm_variable_t *tmp_var = NULL; + char tmp_name[13]; + + + /*array to add the the constraints of fictiv variables */ + double B[15] = {10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 1, 1, 1, 1, 1}; + A = (double **)calloc(links+5, sizeof(double)); for(i=0 ; i< links+5; i++){ @@ -162,7 +173,7 @@ void test3(method_t method) } } - //matrix that store the constraints/topollogy + /*matrix that store the constraints/topollogy*/ /*double A[15][16]= {{0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, @@ -231,15 +242,9 @@ void test3(method_t method) A[13][14] = 1.0; A[14][15] = 1.0; - //array to add the the constraints of fictiv variables - double B[15] = {10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 1, 1, 1, 1, 1}; - lmm_system_t Sys = NULL ; - lmm_constraint_t *tmp_cnst = NULL; - lmm_variable_t *tmp_var = NULL; - char tmp_name[13]; + Sys = lmm_system_new(); -- 2.20.1