Bonjour, j'ai tous plein de warning et d'erreurs que je n'arrive pas à résoudre. Voici une partie de mon fichier fonctions.h (qui contient les prototypes de mes fonctions utilisées)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
void LoadInitialInputs(char *,unsigned short *,IniCond *,double *,double *
,double *,double *,double *,double *,double *,double *,unsigned short *,char [],
char []);
 
void RandomInitialCondition(double,unsigned short,IniCond *,Mechanism *, Engine *,Vector *,Vector *,Vector *,double,N_Vector,double *,double *, double *,double *);
voici une partie de mon fonction.c

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
void RandomInitialCondition(double t0,unsigned short Z,IniCond * ic,Mechanism * mec,Engine * e,Vector * esp_EGR,Vector * comp_EGR,Vector * atoms,double R,N_Vector y0,double * mz,double * pseafr,double * Tini,double * mtot)
{
blabla
}
et voici mon main.c jusqu'où il y a le bug :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
 
int main(int argc,char * argv[])
{
 
    unsigned int i,j,k;
 
/*******************************
 *                             *
 * all initial data are stored *
 *                             *
 *******************************/
    IniCond * ic=CreateEmptyIniCond();
 
    /* Z : numbers of zones
       rpm : rotation per minute
       bore : length of the bore in cm
       rod : length of the rod in cm
       halfstroke : length of the half stroke in cm
       compratio : compression ratio
       turb : constant for the turbulence
       discret : discretisation of the crank angle for the output of the integration
       CA : initial crank angle in dV
       nbcycle : number of cycle compression-exhaust
    */    
    unsigned short Z,nbcycle;
    double rpm,bore,rod,halfstroke,compratio,turb,discret,CA;    
    char thermdata[50]; /* file containing thermodynamic data for each species */
    char syst[50]; /* file containing the system */
 
    /* Les paramètres de la ligne de commande ont une durée de vie égale à
       celle du programme, c'est garanti par la définition du langage C
       
       By default, the inputs file called "input.txt" but the user can use
       another file which will be read in argv[1]
    */
    char * inputfile= (argc==1) ? "input.txt" : argv[1];
 
    LoadInitialInputs(inputfile,&Z,ic,&rpm,&bore,&rod,&halfstroke,&compratio,&turb,&CA,&discret,&nbcycle,syst,thermdata);
 
    Mechanism * mec=LoadMechanism(syst,thermdata); /* mechanism is load */
    Temporary * temp=CreateTemporary(mec->nr,mec->ns,Z);    
 
    /*
      esp_EGR : vector which contains the number of the species of EGR
      comp_EGR : vector which contains the molar composition of each species
    */
    k=NumberSpaces(ic->egr->comp)+1; /* numbers species constituting EGR */
    Vector * esp_EGR=CreateVector(k,0.);
    Vector * comp_EGR=CreateVector(k,0.);
    CreateVectorEGR(ic->egr->comp,mec,esp_EGR,comp_EGR);    
 
    const unsigned short neq=Z*(mec->ns+1); /* numbers of equations */
 
    Vector * atoms=CreateVector(3,0.0);
    atoms->data[0]=7; atoms->data[1]=16;   
 
    Engine * e=CreateEngine(rpm,bore,rod,halfstroke,compratio);
 
    const double t0=RCONST((CA+180.0)/e->six_regime); /* initial time in s */
    const double dt=discret/e->six_regime; /* time step of discretisation in s */
    const realtype R=8.31451e7; /* gaz constante (erg/mol.K) */
    const realtype pa=1.0133e6; /* atmospheric pressure in dyne/cm2 */
 
 
    /************************************************
     *                                              *
     * pseudo-random initial condition of each zone *
     *                                              *
     ************************************************/
 
    /* Create serial vector of length neq for initial conditions */
    N_Vector y=NULL;
    y = N_VNew_Serial(neq);
    if (check_flag((void *)y, "N_VNew_Serial", 0)) return(1);
 
    /* 
       y : index i(ns+1) to i(ns+1)+ns-1 : mass of each species of the ith
                                           zone i=0...N-1
       y : index (i+1)ns+i : temperature of the ith zone i=0...N-1
       ns : numbers of species of the mechanism
    */
 
    /* pseudo-random initial equivalence air-fuel ratio of each zone */
    double * pseafr=malloc(Z*sizeof(*pseafr)); assert(pseafr!=NULL);
 
    /* pseudo-random initial mass of each zone */
    double * mz=malloc(Z*sizeof(*mz)); assert(mz!=NULL);
 
    /* pseudo-random initial temperatures of each zone */
    double * Tini=malloc(Z*sizeof(*Tini)); assert(Tini!=NULL);
 
    double mtot; /* initial total mass of the mixture */
 
    RandomInitialCondition(t0,Z,ic,mec,e,esp_EGR,comp_EGR,atoms,R,y,mz,pseafr,Tini,&mtot);
 
+ la suite de mon main.c
et voici ce que me dit le compilo :
main.c: Dans la fonction « main »:
main.c:168: attention : passage de l'argument n°2 de « RandomInitialCondition » transforme un entier en pointeur sans transtypage
main.c:168: attention : passage de l'argument n°3 de « RandomInitialCondition » d'un type pointeur incompatible
main.c:168: attention : passage de l'argument n°4 de « RandomInitialCondition » d'un type pointeur incompatible
main.c:168: attention : passage de l'argument n°5 de « RandomInitialCondition » d'un type pointeur incompatible
main.c:168: error: incompatible type for argument 7 of `RandomInitialCondition'
main.c:168: attention : passage de l'argument n°8 de « RandomInitialCondition » d'un type pointeur incompatible
main.c:168: error: incompatible type for argument 9 of `RandomInitialCondition'
main.c:168: attention : passage de l'argument n°10 de « RandomInitialCondition » d'un type pointeur incompatible
main.c:168: error: too many arguments to function `RandomInitialCondition'
main.c:202: attention : passage de l'argument n°3 de « RandomInitialPressure » d'un type pointeur incompatible
main.c:202: attention : passage de l'argument n°4 de « RandomInitialPressure » d'un type pointeur incompatible
main.c:202: attention : passage de l'argument n°5 de « RandomInitialPressure » d'un type pointeur incompatible
main.c:202: error: incompatible type for argument 6 of `RandomInitialPressure'
main.c:202: error: incompatible type for argument 8 of `RandomInitialPressure'
main.c:202: error: too few arguments to function `RandomInitialPressure'
main.c:206: attention : passage de l'argument n°2 de « CoeffVolume » d'un type pointeur incompatible
make: *** [main.o] Erreur 1
Là j'avoue que je suis séché ! Pouvez-vous m'aider s'il vous plait ?