jeff247 | Bonjour j'ai un warning qui reviens souvent pour plusieurs lignes de mon programme:
-- passing argument 1 of «NomFonction» from incompatible pointer type --
pour l'exemple de code ici, j'ai comme Warning:
-- attention : passing argument 1 of «getIndex» from incompatible pointer type --
Code :
- //fichier de structures
- typedef struct Cellule_
- {
- char *element;
- int index;
- struct Cellule_ *suivant;
- }Cellule;
- //fichier de fonctions
- int getIndex(Cellule **liste,char *element)
- {
- int nbr=0;
- Cellule *tmp = *liste;
- while(tmp!=NULL)
- {
- if(strcmp(tmp->element,element)==0)
- return nbr;
-
- nbr++;
- tmp = tmp->suivant;
- }
- return -1;
- }
- //fichier test où j'appelle la fonction
- void action(Cellule **lignes,Cellule **colonnes,char *nom, Regle **arbre,char* tableau)
- {
- int ligne = getIndex(&lignes,nom);
- int colonne = getIndex(&colonnes,"M" );
- // .... ect
- }
|
quelqu'un aurait-il une idée pour éliminer tout ces warnings?
car je vois pas...
merci d'avance
|