Bonjour,

lorsque je lance mon programme, j'ai ce warning :

20 J:\Projet_film\fonctions_autre.h [Warning] data definition has no type or storage class

tout fonctionne à la perfection, et je ne comprends pas du tout ce que me veux ce warning !

voici le fichier fonctions_autre.h et la fonction qui pose apparemment problème se trouvant dans le fonctions_autre.c :

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
/* ----- fonctions_autre.h -----*/
/* Les prototype des fonctions utiles (header) */
 
#ifndef DEF_FONCTIONS_AUTRE
#define DEF_FONCTIONS_AUTRE
 
 
    void flush_stdin(void);
 
    void clean(const char *buffer, FILE *fp);
 
    int verif(char *tab);
 
    int verif_film(char *tab);
 
    void convert(char *tab);
 
    int verifannee (int an);
 
    copie(struct film *a,struct film *b);
 
#endif
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
copie(struct film *a,struct film *b)
{
    int i;
    strcpy(a->titre,b->titre);
    a->nbr=b->nbr;
    strcpy(a->realisateur.nom,b->realisateur.nom);
    strcpy(a->realisateur.prenom,b->realisateur.prenom);
    strcpy(a->realisateur.nationalite,b->realisateur.nationalite);
    for( i=0 ; i < b->nbr ; i++)
    {
        strcpy(a->liste[i].nom,b->liste[i].nom);
        strcpy(a->liste[i].prenom,b->liste[i].prenom);
        strcpy(a->liste[i].nationalite,b->liste[i].nationalite);
    }
    a->budget=b->budget;
    a->an=b->an;
}
voici aussi la déclaration de mes structures se trouvant dans fonction_film.h au cas ou cela pourrait vous être utile :

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
struct personne
    {
        char nom[31];//nom de la personne (30 caractère max)
        char prenom[31];//prénom de la personne (30 caractère max)
        char nationalite[41];//nationalité de la personne (40 caractère max)
    };
 
    struct film
    {
        char titre[51];//titre du film (50 caractère max)
        struct personne realisateur;//réalisateur du film
        struct personne *liste;//tableau dynamique de personnes (acteurs)
        int nbr;//nombre d'acteur dans le film
        float budget;//budget du film
        int an;//année de réalisation du film
    };
 
    struct noeud//arbre binaire
    {
        struct film fi;
        struct noeud *fg;//pointe vers le fils gauche
        struct noeud *fd;//pointe vers le fils droit
    };
Merci d'avance pour votre aide

edit :

si je déclare ma fonction en void copie(struct film *a,struct film *b);

là j'ai un warning tout à fait différents :

7 J:\Projet_film\fonctions_autre.c In file included from fonctions_autre.c
20 J:\Projet_film\fonctions_autre.h [Warning] "struct film" declared inside parameter list
20 J:\Projet_film\fonctions_autre.h [Warning] its scope is only this definition or declaration, which is probably not what you want

je comprends plus rien :s