IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

GTK+ avec C & C++ Discussion :

Gestion des paramètres callback : effacement des données


Sujet :

GTK+ avec C & C++

  1. #21
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Citation Envoyé par troumad Voir le message
    Je crois que les normes impliquent un seul return par fonction. Et on se rend bien compte que c'est important de programmer de cette façon si en modifiant une fonction, il faut à la fin libérer la mémoire.
    Humj'ai du mal à saisir la chose, surtout ici. On peut toujours ajouter un pointeur mais je n'en vois pas vraiment l'utilité.
    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
    struct psi_add2 * lecture_case_psi2(char * coordonnees,GMarkupDomNode * ooo)
    {
        GMarkupDomNode * info;
        unsigned short i;
        struct psi_add2 *retour = NULL;
     
        info=donne_case_A1(coordonnees,ooo);
        if (info!=NULL && info->nb_texte!=0)
        {
          for (i=0;i<nb_psi;i++)
          {
            if (psi[i].add2.nom!=NULL && compare_sans_casse(psi[i].add2.nom,info->texte->texte)==0)
            retour = &(psi[i].add2);
            i = nb_psi; // ou break; pour sortir de la boucle. Pas sûr que ce soit très autorisé ici...
          }
        }
     
        return retour;
    }

  2. #22
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Bonjour

    Je vois ton code. J'ai demandé à mon collègue "Norme MISRA" les références avec peut-être des explications. En effet, il faudrait toujours mettre un else après un if même si on ne met rien dedans. C'est vrai qu'à la longue, ce else permet en regardant son code de voir qu'il clot un if.

    Par contre, je ne sais plus pourquoi j'avais commencé mon code par ces if vides. Tout ce que je sais, c'est que je n'ai pas encore testé les fonctions sur les psi. Il est fort probable que je mette un printf dans un des deux cas au moins pour visualiser une anomalie que je ne prends pas en compte lors de l'exécution, mais que j'affiche dans un printf pour signaler que le fichier que le programme lit est mal formaté.
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  3. #23
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Sans vouloir préjuger de tes contraintes, pourquoi tiens-tu à respecter la norme MISRA ? Elle est plutôt dédiée pour du matériel embarqué à forte teneur sécuritaire (voiture, avion, médical...).

    De mon côté j'opterai plutôt pour la norme C99 ou C11, quitte à en choisir une restrictive. (-std=c99 ou -std=c11 avec gcc)

    Ceci étant, je te transmets la compilation de ton code une fois mis dans un projet géré par les autotools :
    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
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    lire_odc.c: In function ‘donne_float_A1’:
    lire_odc.c:17:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         fnan =*((float*)&l_nan);
         ^
    lire_odc.c: In function ‘donne_float_ij’:
    lire_odc.c:49:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         fnan =*((float*)&l_nan); /* astuce pour créer un float NaN */
         ^
    lire_odc.c:121:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                     else       fnan =*((float*)&l_nan); /* astuce pour créer un float NaN */
                     ^
    lire_odc.c:124:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                     fnan =*((float*)&l_nan); /* astuce pour créer un float NaN */
                     ^
    lire_odc.c:127:14: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                  fnan =*((float*)&l_nan); /* astuce pour créer un float NaN */
                  ^
    mv -f .deps/perso-lire_odc.Tpo .deps/perso-lire_odc.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-main.o -MD -MP -MF .deps/perso-main.Tpo -c -o perso-main.o `test -f 'main.c' || echo './'`main.c
    mv -f .deps/perso-main.Tpo .deps/perso-main.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-menu.o -MD -MP -MF .deps/perso-menu.Tpo -c -o perso-menu.o `test -f 'menu.c' || echo './'`menu.c
    menu.c:674:6: warning: no previous declaration for ‘change_choix_sexe’ [-Wmissing-declarations]
     void change_choix_sexe(GtkRadioButton *widget, struct widgets * widgets)
          ^
    menu.c:975:6: warning: no previous declaration for ‘Change_Niv’ [-Wmissing-declarations]
     void Change_Niv(GtkMenuItem *menuitem, struct widgets * widgets)
          ^
    In file included from /usr/include/glib-2.0/gobject/gobject.h:24:0,
                     from /usr/include/glib-2.0/gobject/gbinding.h:29,
                     from /usr/include/glib-2.0/glib-object.h:23,
                     from /usr/include/glib-2.0/gio/gioenums.h:28,
                     from /usr/include/glib-2.0/gio/giotypes.h:28,
                     from /usr/include/glib-2.0/gio/gio.h:26,
                     from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28,
                     from /usr/include/gtk-3.0/gdk/gdk.h:32,
                     from /usr/include/gtk-3.0/gtk/gtk.h:30,
                     from include.h:7,
                     from menu.c:1:
    menu.c: In function ‘FeuilleDeChoix’:
    /usr/include/glib-2.0/gobject/gtype.h:2186:12: warning: ‘coche0’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
                ^
    menu.c:299:35: note: ‘coche0’ was declared here
         GtkWidget * boite, *coche , * coche0, * colonne;
                                       ^
    menu.c: In function ‘Change_Pref’:
    menu.c:91:72: warning: ‘ligne_a_changer’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Pref[ligne_a_changer][j]),TR
                                                                            ^
    mv -f .deps/perso-menu.Tpo .deps/perso-menu.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-messages.o -MD -MP -MF .deps/perso-messages.Tpo -c -o perso-messages.o `test -f 'messages.c' || echo './'`messages.c
    mv -f .deps/perso-messages.Tpo .deps/perso-messages.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-modif_perso.o -MD -MP -MF .deps/perso-modif_perso.Tpo -c -o perso-modif_perso.o `test -f 'modif_perso.c' || echo './'`modif_perso.c
    modif_perso.c:217:6: warning: no previous declaration for ‘ferme_modif’ [-Wmissing-declarations]
     void ferme_modif(GtkWidget *widget, FenetrePerso * _perso)
          ^
    modif_perso.c:318:6: warning: no previous declaration for ‘ferme_modif_perso’ [-Wmissing-declarations]
     void ferme_modif_perso(GtkWidget *wid, FenetrePerso * _perso)
          ^
    mv -f .deps/perso-modif_perso.Tpo .deps/perso-modif_perso.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-ouverture.o -MD -MP -MF .deps/perso-ouverture.Tpo -c -o perso-ouverture.o `test -f 'ouverture.c' || echo './'`ouverture.c
    ouverture.c:903:7: warning: no previous declaration for ‘ouverture_liste’ [-Wmissing-declarations]
     void  ouverture_liste(GtkWidget *ChildWidget , struct widgets * widgets)
           ^
    ouverture.c:918:6: warning: no previous declaration for ‘ouvre_recent’ [-Wmissing-declarations]
     void ouvre_recent (GtkRecentChooser *chooser, gpointer          user_data)
          ^
    mv -f .deps/perso-ouverture.Tpo .deps/perso-ouverture.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-sorts.o -MD -MP -MF .deps/perso-sorts.Tpo -c -o perso-sorts.o `test -f 'sorts.c' || echo './'`sorts.c
    sorts.c: In function ‘lire_struct_sort’:
    sorts.c:89:25: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
      unsigned short i=0,k=0,l=0;
                             ^
    mv -f .deps/perso-sorts.Tpo .deps/perso-sorts.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-style.o -MD -MP -MF .deps/perso-style.Tpo -c -o perso-style.o `test -f 'style.c' || echo './'`style.c
    style.c:3:10: warning: redundant redeclaration of ‘style1’ [-Wredundant-decls]
     gboolean style1(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    In file included from style.c:1:0:
    include.h:625:10: note: previous declaration of ‘style1’ was here
     gboolean style1(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    style.c:4:10: warning: redundant redeclaration of ‘style2’ [-Wredundant-decls]
     gboolean style2(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    In file included from style.c:1:0:
    include.h:626:10: note: previous declaration of ‘style2’ was here
     gboolean style2(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    style.c:5:10: warning: redundant redeclaration of ‘style3’ [-Wredundant-decls]
     gboolean style3(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    In file included from style.c:1:0:
    include.h:627:10: note: previous declaration of ‘style3’ was here
     gboolean style3(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    style.c:6:10: warning: redundant redeclaration of ‘style4’ [-Wredundant-decls]
     gboolean style4(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    In file included from style.c:1:0:
    include.h:628:10: note: previous declaration of ‘style4’ was here
     gboolean style4(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    style.c:7:10: warning: redundant redeclaration of ‘style5’ [-Wredundant-decls]
     gboolean style5(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    In file included from style.c:1:0:
    include.h:629:10: note: previous declaration of ‘style5’ was here
     gboolean style5(GtkWidget *ChildWidget, cairo_t *cr);
              ^
    style.c:8:10: warning: redundant redeclaration of ‘style_race’ [-Wredundant-decls]
     gboolean style_race(GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets);
              ^
    In file included from style.c:1:0:
    include.h:630:10: note: previous declaration of ‘style_race’ was here
     gboolean style_race(GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets);
              ^
    style.c:9:10: warning: redundant redeclaration of ‘style_classe’ [-Wredundant-decls]
     gboolean style_classe(GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets);
              ^
    In file included from style.c:1:0:
    include.h:631:10: note: previous declaration of ‘style_classe’ was here
     gboolean style_classe(GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets);
              ^
    style.c:10:6: warning: redundant redeclaration of ‘bord’ [-Wredundant-decls]
     void bord (GtkWidget *ChildWidget, cairo_t *cr);
          ^
    In file included from style.c:1:0:
    include.h:624:6: note: previous declaration of ‘bord’ was here
     void bord (GtkWidget *ChildWidget, cairo_t *cr);
          ^
    style.c:11:6: warning: redundant redeclaration of ‘style’ [-Wredundant-decls]
     void style (GtkWidget *ChildWidget, cairo_t *cr,double rouge, double vert, double bleu);
          ^
    In file included from style.c:1:0:
    include.h:623:6: note: previous declaration of ‘style’ was here
     void style (GtkWidget *ChildWidget, cairo_t *cr,double rouge, double vert, double bleu);
          ^
    mv -f .deps/perso-style.Tpo .deps/perso-style.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-tableaux.o -MD -MP -MF .deps/perso-tableaux.Tpo -c -o perso-tableaux.o `test -f 'tableaux.c' || echo './'`tableaux.c
    mv -f .deps/perso-tableaux.Tpo .deps/perso-tableaux.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-tirage.o -MD -MP -MF .deps/perso-tirage.Tpo -c -o perso-tirage.o `test -f 'tirage.c' || echo './'`tirage.c
    tirage.c: In function ‘applique_menu’:
    tirage.c:91:36: warning: ‘niv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         b_constit_add2=(signed short *)malloc(niv*sizeof(signed short *));
                                        ^
    mv -f .deps/perso-tirage.Tpo .deps/perso-tirage.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-utile.o -MD -MP -MF .deps/perso-utile.Tpo -c -o perso-utile.o `test -f 'utile.c' || echo './'`utile.c
    utile.c: In function ‘est_multi_compatible’:
    utile.c:76:12: warning: ‘i’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             if (retour!=i) /* i vaut le nombre de classe de la liste à tester */
                ^

  4. #24
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Pourquoi je cherche le plus possible à suivre les normes MISRA ?
    Tout simplement parce que j'enseigne le C en IUT de GEii et que par la suite, les étudiants peuvent être amené à programmer dans ces environnements. Comme je leur enseigne les bases du C, les perfectionnements et autres approfondissement, ce n'est pas pas, j'essaie de me tenir à ce qu'on pourra leur demander.

    Pour le reste, je verrais plus tard quand j'aurais le temps...
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  5. #25
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Citation Envoyé par troumad Voir le message
    Pourquoi je cherche le plus possible à suivre les normes MISRA ?
    Tout simplement parce que j'enseigne le C en IUT de GEii et que par la suite, les étudiants peuvent être amené à programmer dans ces environnements. Comme je leur enseigne les bases du C, les perfectionnements et autres approfondissement, ce n'est pas pas, j'essaie de me tenir à ce qu'on pourra leur demander.

    Pour le reste, je verrais plus tard quand j'aurais le temps...
    Je comprends mieux à présent. Connaîtrais-tu un vérificateur libre pour passer à la moulinette ton code ?

  6. #26
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Non...
    Je commence juste cette année à me mettre à cette norme à fond. Ceci dit, depuis que j'y mets les pieds petit à petit, j'ai commencé par trouver des désagréments. Puis petit à petit, j'ai trouvé les avantages qu'ils apportent.
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  7. #27
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Tout est corrigé sauf ça (et les autres semblables) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    lire_odc.c:17:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         fnan =*((float*)&l_nan);
    C'est une astuce que j'avais trouvé pour générer un float qui vaut Not A Number. S'il existe une méthode officielle, je veux bien la prendre.

    parfois, j'ai modifié des choses pour faire plaisir à ce correcteur : des
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    utile.c: In function ‘est_multi_compatible’:
    utile.c:76:12: warning: ‘i’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             if (retour!=i) /* i vaut le nombre de classe de la liste à tester */
    où le i était obligatoirement initialisé avant.
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  8. #28
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    J'ai repris le lien de perso4.zip en espérant qu'il soit mis à jour pour mettre à jour tes sources sur ma machine.

    J'ai relancé une compilation. Bon courage :
    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
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    -*- mode: compilation; default-directory: "~/Projects/troomad/src/" -*-
    Compilation started at Thu Sep 24 18:50:44
     
    make -k 
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-chaine.o -MD -MP -MF .deps/perso-chaine.Tpo -c -o perso-chaine.o `test -f 'chaine.c' || echo './'`chaine.c
    mv -f .deps/perso-chaine.Tpo .deps/perso-chaine.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-classe.o -MD -MP -MF .deps/perso-classe.Tpo -c -o perso-classe.o `test -f 'classe.c' || echo './'`classe.c
    mv -f .deps/perso-classe.Tpo .deps/perso-classe.Po
    make: *** No rule to make target 'dieu.c', needed by 'perso-dieu.o'.
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-envp.o -MD -MP -MF .deps/perso-envp.Tpo -c -o perso-envp.o `test -f 'envp.c' || echo './'`envp.c
    envp.c: In function ‘chemin_exe’:
    envp.c:45:7: warning: implicit declaration of function ‘readlink’ [-Wimplicit-function-declaration]
           if (readlink(ch,chemin,1023)<0)
           ^
    envp.c: In function ‘envp_init’:
    envp.c:72:27: warning: unused parameter ‘param’ [-Wunused-parameter]
     char * envp_init(gpointer param)
                               ^
    mv -f .deps/perso-envp.Tpo .deps/perso-envp.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-gestion_fenetre_perso.o -MD -MP -MF .deps/perso-gestion_fenetre_perso.Tpo -c -o perso-gestion_fenetre_perso.o `test -f 'gestion_fenetre_perso.c' || echo './'`gestion_fenetre_perso.c
    gestion_fenetre_perso.c: In function ‘nouveau’:
    gestion_fenetre_perso.c:367:25: warning: unused parameter ‘wid’ [-Wunused-parameter]
     void nouveau(GtkWidget *wid, struct widgets * param)
                             ^
    gestion_fenetre_perso.c:367:47: warning: unused parameter ‘param’ [-Wunused-parameter]
     void nouveau(GtkWidget *wid, struct widgets * param)
                                                   ^
    mv -f .deps/perso-gestion_fenetre_perso.Tpo .deps/perso-gestion_fenetre_perso.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-gestion_glade.o -MD -MP -MF .deps/perso-gestion_glade.Tpo -c -o perso-gestion_glade.o `test -f 'gestion_glade.c' || echo './'`gestion_glade.c
    gestion_glade.c: In function ‘ferme_glade’:
    gestion_glade.c:51:29: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void ferme_glade(GtkWidget *ChildWidget , struct widgets * widgets)
                                 ^
    mv -f .deps/perso-gestion_glade.Tpo .deps/perso-gestion_glade.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-groupe.o -MD -MP -MF .deps/perso-groupe.Tpo -c -o perso-groupe.o `test -f 'groupe.c' || echo './'`groupe.c
    groupe.c: In function ‘enregistre_groupe’:
    groupe.c:85:32: warning: comparison is always true due to limited range of data type [-Wtype-limits]
         for(i=strlen(chemin_gr)-1;i>=0 && chemin_gr[i]!=SEPARATEUR;i--);
                                    ^
    groupe.c:86:10: warning: comparison is always true due to limited range of data type [-Wtype-limits]
         if (i>=0) /* on ne retient que le chemin, le nom est au bout */
              ^
    groupe.c:96:33: warning: comparison is always true due to limited range of data type [-Wtype-limits]
             for(j=strlen(chaine)-1;j>=0 && chaine[j]!=SEPARATEUR;j--);
                                     ^
    groupe.c:104:14: warning: comparison is always true due to limited range of data type [-Wtype-limits]
             if (j>=0) /* on ne retient que le chemin */
                  ^
    groupe.c:36:35: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void enregistre_groupe(GtkWidget *ChildWidget , FenetrePerso * fenetre)
                                       ^
    groupe.c: In function ‘enregistre_groupe_sous’:
    groupe.c:186:40: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void enregistre_groupe_sous(GtkWidget *ChildWidget, FenetrePerso * fenetre)
                                            ^
    groupe.c: In function ‘nouveau_nom_groupe’:
    groupe.c:205:37: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void  nouveau_nom_groupe(GtkWidget *ChildWidget, struct callback_nv_nom * c_b)
                                         ^
    groupe.c: In function ‘ajouter_perso_groupe’:
    groupe.c:245:38: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void ajouter_perso_groupe(GtkWidget *ChildWidget, FenetrePerso * fenetre)
                                          ^
    groupe.c: In function ‘ferme_nv_nom’:
    groupe.c:298:30: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void ferme_nv_nom(GtkWidget *ChildWidget , GtkWidget * fenetre)
                                  ^
    groupe.c: In function ‘callback_suppr_perso_groupe’:
    groupe.c:707:45: warning: unused parameter ‘button’ [-Wunused-parameter]
     void callback_suppr_perso_groupe(GtkButton *button, perso_groupe * p_gr)
                                                 ^
    groupe.c: In function ‘enregitre_perso_sous’:
    groupe.c:730:38: warning: unused parameter ‘button’ [-Wunused-parameter]
     void enregitre_perso_sous(GtkButton *button, FenetrePerso * _perso)
                                          ^
    groupe.c:730:61: warning: unused parameter ‘_perso’ [-Wunused-parameter]
     void enregitre_perso_sous(GtkButton *button, FenetrePerso * _perso)
                                                                 ^
    groupe.c: In function ‘enregitre_perso’:
    groupe.c:735:33: warning: unused parameter ‘button’ [-Wunused-parameter]
     void enregitre_perso(GtkButton *button, FenetrePerso * _perso)
                                     ^
    groupe.c:735:56: warning: unused parameter ‘_perso’ [-Wunused-parameter]
     void enregitre_perso(GtkButton *button, FenetrePerso * _perso)
                                                            ^
    mv -f .deps/perso-groupe.Tpo .deps/perso-groupe.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-lecture_fichier.o -MD -MP -MF .deps/perso-lecture_fichier.Tpo -c -o perso-lecture_fichier.o `test -f 'lecture_fichier.c' || echo './'`lecture_fichier.c
    lecture_fichier.c: In function ‘lecture_case_psi2’:
    lecture_fichier.c:891:5: warning: ‘retour’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         return retour;
         ^
    mv -f .deps/perso-lecture_fichier.Tpo .deps/perso-lecture_fichier.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-lire_odc.o -MD -MP -MF .deps/perso-lire_odc.Tpo -c -o perso-lire_odc.o `test -f 'lire_odc.c' || echo './'`lire_odc.c
    lire_odc.c: In function ‘donne_float_A1’:
    lire_odc.c:17:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         fnan =*((float*)&l_nan);
         ^
    lire_odc.c: In function ‘donne_float_ij’:
    lire_odc.c:49:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         fnan =*((float*)&l_nan); /* astuce pour créer un float NaN */
         ^
    lire_odc.c:121:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                     else       fnan =*((float*)&l_nan); /* astuce pour créer un float NaN */
                     ^
    lire_odc.c:124:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                     fnan =*((float*)&l_nan); /* astuce pour créer un float NaN */
                     ^
    lire_odc.c:127:14: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                  fnan =*((float*)&l_nan); /* astuce pour créer un float NaN */
                  ^
    mv -f .deps/perso-lire_odc.Tpo .deps/perso-lire_odc.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-main.o -MD -MP -MF .deps/perso-main.Tpo -c -o perso-main.o `test -f 'main.c' || echo './'`main.c
    main.c: In function ‘cb_quit’:
    main.c:62:30: warning: unused parameter ‘widget’ [-Wunused-parameter]
     gboolean cb_quit (GtkWidget *widget, GdkEvent  *event, struct widgets *widgets)
                                  ^
    main.c:62:49: warning: unused parameter ‘event’ [-Wunused-parameter]
     gboolean cb_quit (GtkWidget *widget, GdkEvent  *event, struct widgets *widgets)
                                                     ^
    main.c:62:72: warning: unused parameter ‘widgets’ [-Wunused-parameter]
     gboolean cb_quit (GtkWidget *widget, GdkEvent  *event, struct widgets *widgets)
                                                                            ^
    mv -f .deps/perso-main.Tpo .deps/perso-main.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-menu.o -MD -MP -MF .deps/perso-menu.Tpo -c -o perso-menu.o `test -f 'menu.c' || echo './'`menu.c
    menu.c: In function ‘complete_menu’:
    menu.c:114:34: warning: unused parameter ‘menuitem’ [-Wunused-parameter]
     void complete_menu (GtkMenuItem *menuitem, struct widgets *widgets)
                                      ^
    menu.c: In function ‘quite_choix’:
    menu.c:430:29: warning: unused parameter ‘widget’ [-Wunused-parameter]
     void quite_choix(GtkWidget *widget, struct widgets * widgets)
                                 ^
    menu.c: In function ‘Change_Tirage’:
    menu.c:842:34: warning: unused parameter ‘menuitem’ [-Wunused-parameter]
     void Change_Tirage (GtkMenuItem *menuitem, struct widgets * widgets)
                                      ^
    menu.c:842:61: warning: unused parameter ‘widgets’ [-Wunused-parameter]
     void Change_Tirage (GtkMenuItem *menuitem, struct widgets * widgets)
                                                                 ^
    menu.c: In function ‘Change_Sexe’:
    menu.c:852:32: warning: unused parameter ‘menuitem’ [-Wunused-parameter]
     void Change_Sexe (GtkMenuItem *menuitem, struct widgets * widgets)
                                    ^
    menu.c:852:59: warning: unused parameter ‘widgets’ [-Wunused-parameter]
     void Change_Sexe (GtkMenuItem *menuitem, struct widgets * widgets)
                                                               ^
    menu.c: In function ‘Change_Pdv’:
    menu.c:857:31: warning: unused parameter ‘menuitem’ [-Wunused-parameter]
     void Change_Pdv (GtkMenuItem *menuitem, struct widgets * widgets)
                                   ^
    menu.c:857:58: warning: unused parameter ‘widgets’ [-Wunused-parameter]
     void Change_Pdv (GtkMenuItem *menuitem, struct widgets * widgets)
                                                              ^
    menu.c: In function ‘Change_Niv’:
    menu.c:977:30: warning: unused parameter ‘menuitem’ [-Wunused-parameter]
     void Change_Niv(GtkMenuItem *menuitem, struct widgets * widgets)
                                  ^
    menu.c: In function ‘Change_Pref’:
    menu.c:93:72: warning: ‘ligne_a_changer’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Pref[ligne_a_changer][j]),TR
                                                                            ^
    mv -f .deps/perso-menu.Tpo .deps/perso-menu.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-messages.o -MD -MP -MF .deps/perso-messages.Tpo -c -o perso-messages.o `test -f 'messages.c' || echo './'`messages.c
    messages.c: In function ‘GPL’:
    messages.c:3:24: warning: unused parameter ‘menuitem’ [-Wunused-parameter]
     void GPL (GtkMenuItem *menuitem, struct widgets * _widgets)
                            ^
    messages.c:3:51: warning: unused parameter ‘_widgets’ [-Wunused-parameter]
     void GPL (GtkMenuItem *menuitem, struct widgets * _widgets)
                                                       ^
    messages.c: In function ‘Explication’:
    messages.c:8:33: warning: unused parameter ‘menuitem’ [-Wunused-parameter]
     void Explication  (GtkMenuItem *menuitem, struct widgets * _widgets)
                                     ^
    messages.c:8:60: warning: unused parameter ‘_widgets’ [-Wunused-parameter]
     void Explication  (GtkMenuItem *menuitem, struct widgets * _widgets)
                                                                ^
    mv -f .deps/perso-messages.Tpo .deps/perso-messages.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-modif_perso.o -MD -MP -MF .deps/perso-modif_perso.Tpo -c -o perso-modif_perso.o `test -f 'modif_perso.c' || echo './'`modif_perso.c
    modif_perso.c: In function ‘modif_perso’:
    modif_perso.c:12:30: warning: unused parameter ‘appel’ [-Wunused-parameter]
     void modif_perso(GtkWidget * appel, FenetrePerso * _perso)
                                  ^
    modif_perso.c: In function ‘ferme_modif’:
    modif_perso.c:205:29: warning: unused parameter ‘widget’ [-Wunused-parameter]
     void ferme_modif(GtkWidget *widget, FenetrePerso * _perso)
                                 ^
    modif_perso.c: At top level:
    modif_perso.c:306:6: warning: no previous declaration for ‘ferme_modif_perso’ [-Wmissing-declarations]
     void ferme_modif_perso(GtkWidget *wid, FenetrePerso * _perso)
          ^
    mv -f .deps/perso-modif_perso.Tpo .deps/perso-modif_perso.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-ouverture.o -MD -MP -MF .deps/perso-ouverture.Tpo -c -o perso-ouverture.o `test -f 'ouverture.c' || echo './'`ouverture.c
    ouverture.c: In function ‘ouverture’:
    ouverture.c:30:27: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void ouverture(GtkWidget *ChildWidget, struct widgets * _widgets)
                               ^
    ouverture.c:30:57: warning: unused parameter ‘_widgets’ [-Wunused-parameter]
     void ouverture(GtkWidget *ChildWidget, struct widgets * _widgets)
                                                             ^
    ouverture.c: In function ‘ouvre_perso’:
    ouverture.c:653:39: warning: comparison is always true due to limited range of data type [-Wtype-limits]
                                     if (nv>=0 && nv<9 && _perso->perso.livre_sorts[nv]!=NULL)
                                           ^
    ouverture.c: In function ‘ouvre_recent’:
    ouverture.c:920:65: warning: unused parameter ‘user_data’ [-Wunused-parameter]
     void ouvre_recent (GtkRecentChooser *chooser, gpointer          user_data)
                                                                     ^
    ouverture.c: In function ‘callback_ouvre_perso’:
    ouverture.c:932:38: warning: unused parameter ‘button’ [-Wunused-parameter]
     void callback_ouvre_perso(GtkButton *button, char * ch)
                                          ^
    mv -f .deps/perso-ouverture.Tpo .deps/perso-ouverture.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-sorts.o -MD -MP -MF .deps/perso-sorts.Tpo -c -o perso-sorts.o `test -f 'sorts.c' || echo './'`sorts.c
    mv -f .deps/perso-sorts.Tpo .deps/perso-sorts.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-style.o -MD -MP -MF .deps/perso-style.Tpo -c -o perso-style.o `test -f 'style.c' || echo './'`style.c
    style.c: In function ‘style’:
    style.c:263:24: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void style (GtkWidget *ChildWidget, cairo_t *cr,double rouge, double vert, double bleu)
                            ^
    style.c: In function ‘classe_active’:
    style.c:269:32: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void classe_active (GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets)
                                    ^
    style.c:269:54: warning: unused parameter ‘cr’ [-Wunused-parameter]
     void classe_active (GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets)
                                                          ^
    style.c:269:73: warning: unused parameter ‘widgets’ [-Wunused-parameter]
     void classe_active (GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets)
                                                                             ^
    style.c: In function ‘race_active’:
    style.c:274:30: warning: unused parameter ‘ChildWidget’ [-Wunused-parameter]
     void race_active (GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets)
                                  ^
    style.c:274:52: warning: unused parameter ‘cr’ [-Wunused-parameter]
     void race_active (GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets)
                                                        ^
    style.c:274:71: warning: unused parameter ‘widgets’ [-Wunused-parameter]
     void race_active (GtkWidget *ChildWidget, cairo_t *cr,struct widgets *widgets)
                                                                           ^
    mv -f .deps/perso-style.Tpo .deps/perso-style.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-tableaux.o -MD -MP -MF .deps/perso-tableaux.Tpo -c -o perso-tableaux.o `test -f 'tableaux.c' || echo './'`tableaux.c
    mv -f .deps/perso-tableaux.Tpo .deps/perso-tableaux.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-tirage.o -MD -MP -MF .deps/perso-tirage.Tpo -c -o perso-tirage.o `test -f 'tirage.c' || echo './'`tirage.c
    tirage.c: In function ‘applique_menu’:
    tirage.c:41:31: warning: unused parameter ‘wid_appel’ [-Wunused-parameter]
     void applique_menu(GtkWidget *wid_appel, struct widgets * widgets)
                                   ^
    tirage.c:91:36: warning: ‘niv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         b_constit_add2=(signed short *)malloc(niv*sizeof(signed short *));
                                        ^
    mv -f .deps/perso-tirage.Tpo .deps/perso-tirage.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-utile.o -MD -MP -MF .deps/perso-utile.Tpo -c -o perso-utile.o `test -f 'utile.c' || echo './'`utile.c
    mv -f .deps/perso-utile.Tpo .deps/perso-utile.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-xml.o -MD -MP -MF .deps/perso-xml.Tpo -c -o perso-xml.o `test -f 'xml.c' || echo './'`xml.c
    mv -f .deps/perso-xml.Tpo .deps/perso-xml.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -std=c11 -Wextra -Wshadow  -Winit-self  -Wredundant-decls  -Wcast-align  -Wundef  -Wfloat-equal  -Winline  -Wunreachable-code  -Wmissing-declarations  -Wmissing-include-dirs  -Wswitch-enum  -Wswitch-default  -Wmain  -Wall  `pkg-config gtk+-3.0 --cflags` -export-dynamic   -g -O2 -MT perso-zip.o -MD -MP -MF .deps/perso-zip.Tpo -c -o perso-zip.o `test -f 'zip.c' || echo './'`zip.c
    mv -f .deps/perso-zip.Tpo .deps/perso-zip.Po
    make: Target 'all' not remade because of errors.
     
    Compilation exited abnormally with code 2 at Thu Sep 24 18:50:59

  9. #29
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Cette fois, j'ai carrément compilé avec tes options. Je n'ai plus eu de warning... Tu peux regarder, la nouvelle version est en ligne.

    Mais, j'ai toujours le problème original. Au passage, j'ai vu que certaines bibliothèques ont été rapatriées dans ce projet sans que le code ait été un peu mis aux normes MISRA.
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  10. #30
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Je viens de reprendre ton projet tel qu'il est (plus d'utilisation des autotools). Il compile sans problème.

    J'ai donc lancé le projet avec Gdb. J'obtiens un premier plantage si j'utilise le bouton Appliquer puis dans la fenêtre ouverte le bouton modifier. Ce plantage arrive aussi si j'ouvre un groupe de personnage avant.

    Voila ligne incriminée :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    #0  0x0000000000426d2c in modif_perso (appel=0xae9ba0, _perso=0xd2f210) at modif_perso.c:98

  11. #31
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Résolu...
    Nouveau zip en ligne.
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  12. #32
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Je sais, ca va t'énerver . Alors cette fois-ci on clique sur le bouton nouveau puis sur modifier. Même type de plantage que précédemment.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    #0  0x00000000004266aa in modif_perso (appel=0x13f36a0, _perso=0xd31290) at modif_perso.c:48

  13. #33
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Oui... pourquoi chez moi ce test ne plante pas...
    Je viens de corriger cette partie du code en rajoutant une protection. Mais, comme le reste du code est en travail, je mettrais en ligne le reste plus tard.
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  14. #34
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Je compile avec l'option -g en plus des tiens et je lance ton application via gdb. Ceci explique peut-être cela...

    Ce que je cherche à faire est de garantir une exécution stable de ton application pour ensuite pouvoir lancer un test sur l'utilisation mémoire.

    Je n'en ai pas encore fini avec ton projet .

  15. #35
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Il faudra en plus que je lance avec gdb... L'option -g est présente dans mes options de codeblocks il me semble.
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  16. #36
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Une nouvelle version est en ligne.

    Elle a un problème que je dois résoudre et deux fonction obsolètes depuis gtk 3.16... Mais, peut-être tu vas trouver autre chose
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  17. #37
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Le code semble un peu plus stable. Je ne suis pas arrivé à le faire planter . J'y ai pourtant mis du mien, tu peux me croire .

    Je suis donc passé à l'étape suivante : la gestion de la mémoire. Pour se faire j'utilise valgrind, qui utilise aussi l'option -g de gcc.

    Voila un premier résultat, qui n'est qu'un extrait. Pour ce test je n'ai fait que lancé ton application pour la quitter dans la foulée.

    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
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    ==4332== 6,544 (32 direct, 6,512 indirect) bytes in 2 blocks are definitely lost in loss record 9,862 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40E597: lire_struct_armures (lecture_fichier.c:1229)
    ==4332==    by 0x40B4BD: lecture_fichiers (lecture_fichier.c:347)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 6,544 (32 direct, 6,512 indirect) bytes in 2 blocks are definitely lost in loss record 9,863 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x410523: lire_struct_competences (lecture_fichier.c:1767)
    ==4332==    by 0x40BCC6: lecture_fichiers (lecture_fichier.c:487)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 6,574 (88 direct, 6,486 indirect) bytes in 1 blocks are definitely lost in loss record 9,864 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417B41: g_markup_dom_new (xml.c:397)
    ==4332==    by 0x40EE77: retourne_psi (lecture_fichier.c:1354)
    ==4332==    by 0x40B66F: lecture_fichiers (lecture_fichier.c:369)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 6,574 (264 direct, 6,310 indirect) bytes in 1 blocks are definitely lost in loss record 9,865 of 10,059
    ==4332==    at 0x4C2AF2E: realloc (vg_replace_malloc.c:692)
    ==4332==    by 0x6DCF85D: g_realloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417135: xml_start_element (xml.c:186)
    ==4332==    by 0x6DCD14A: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCE2AD: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40EE77: retourne_psi (lecture_fichier.c:1354)
    ==4332==    by 0x40B66F: lecture_fichiers (lecture_fichier.c:369)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 6,840 (32 direct, 6,808 indirect) bytes in 2 blocks are definitely lost in loss record 9,868 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x4196E6: lire_struct_sort (sorts.c:98)
    ==4332==    by 0x4195B1: lire_sorts (sorts.c:71)
    ==4332==    by 0x40AD29: lecture_fichiers (lecture_fichier.c:235)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 7,152 bytes in 1 blocks are possibly lost in loss record 9,872 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0xB89A0CC: inflateInit2_ (in /lib/x86_64-linux-gnu/libz.so.1.2.8)
    ==4332==    by 0x7098E94: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7099D25: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7099D10: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7096CD6: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40F464: retourne_race (lecture_fichier.c:1439)
    ==4332==    by 0x40BA49: lecture_fichiers (lecture_fichier.c:445)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 8,328 bytes in 1 blocks are possibly lost in loss record 9,898 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x70993D2: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x709A8F5: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7096CC0: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40F464: retourne_race (lecture_fichier.c:1439)
    ==4332==    by 0x40BA49: lecture_fichiers (lecture_fichier.c:445)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 8,807 (6,656 direct, 2,151 indirect) bytes in 26 blocks are definitely lost in loss record 9,910 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x935A739: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332==    by 0x935AE59: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332==    by 0x935BDCA: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332==    by 0x9360FFB: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332==    by 0xCC4DD52: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0xCC4E66B: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0xCC4C9B8: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0xCC4D134: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0xCC506CF: XML_ParseBuffer (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0x935FE4A: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332==    by 0x9360176: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332==    by 0x9360B89: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332==    by 0xCC4DD52: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0xCC4E66B: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0xCC4C9B8: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0xCC4D134: ??? (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0xCC506CF: XML_ParseBuffer (in /lib/x86_64-linux-gnu/libexpat.so.1.6.0)
    ==4332==    by 0x935FE4A: FcConfigParseAndLoad (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332==    by 0x935420D: ??? (in /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0)
    ==4332== 
    ==4332== 9,280 bytes in 29 blocks are definitely lost in loss record 9,915 of 10,059
    ==4332==    at 0x4C2AF2E: realloc (vg_replace_malloc.c:692)
    ==4332==    by 0x6DCF85D: g_realloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCDAF3: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40BD2E: retourne_classe (lecture_fichier.c:501)
    ==4332==    by 0x40B7CB: lecture_fichiers (lecture_fichier.c:399)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 9,280 bytes in 29 blocks are definitely lost in loss record 9,916 of 10,059
    ==4332==    at 0x4C2AF2E: realloc (vg_replace_malloc.c:692)
    ==4332==    by 0x6DCF85D: g_realloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCDB08: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40BD2E: retourne_classe (lecture_fichier.c:501)
    ==4332==    by 0x40B7CB: lecture_fichiers (lecture_fichier.c:399)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 12,256 (64 direct, 12,192 indirect) bytes in 4 blocks are definitely lost in loss record 9,945 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40EE77: retourne_psi (lecture_fichier.c:1354)
    ==4332==    by 0x40B66F: lecture_fichiers (lecture_fichier.c:369)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 29,424 (160 direct, 29,264 indirect) bytes in 10 blocks are definitely lost in loss record 9,989 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40E9F9: groupe_armes (lecture_fichier.c:1291)
    ==4332==    by 0x40B433: lecture_fichiers (lecture_fichier.c:335)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 32,768 bytes in 1 blocks are possibly lost in loss record 9,995 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0xB89BE13: inflate (in /lib/x86_64-linux-gnu/libz.so.1.2.8)
    ==4332==    by 0x7098EF8: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x709A274: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7098B8B: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x709A274: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7096DD6: zip_fread (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x41157E: content_libo (zip.c:122)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40D9B4: retourne_save (lecture_fichier.c:1052)
    ==4332==    by 0x40B17F: lecture_fichiers (lecture_fichier.c:283)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 32,768 bytes in 1 blocks are possibly lost in loss record 9,996 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0xB89BE13: inflate (in /lib/x86_64-linux-gnu/libz.so.1.2.8)
    ==4332==    by 0x7098EF8: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x709A274: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7098B8B: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x709A274: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7096DD6: zip_fread (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x41157E: content_libo (zip.c:122)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40E9F9: groupe_armes (lecture_fichier.c:1291)
    ==4332==    by 0x40B319: lecture_fichiers (lecture_fichier.c:314)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 32,768 bytes in 1 blocks are possibly lost in loss record 9,997 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0xB89BE13: inflate (in /lib/x86_64-linux-gnu/libz.so.1.2.8)
    ==4332==    by 0x7098EF8: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x709A274: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7098B8B: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x709A274: ??? (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x7096DD6: zip_fread (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x41157E: content_libo (zip.c:122)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40F464: retourne_race (lecture_fichier.c:1439)
    ==4332==    by 0x40BA49: lecture_fichiers (lecture_fichier.c:445)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 32,816 bytes in 1 blocks are definitely lost in loss record 10,003 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7353610: __alloc_dir (opendir.c:207)
    ==4332==    by 0x40B289: lecture_fichiers (lecture_fichier.c:305)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 32,816 bytes in 1 blocks are definitely lost in loss record 10,004 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7353610: __alloc_dir (opendir.c:207)
    ==4332==    by 0x40B3A3: lecture_fichiers (lecture_fichier.c:326)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 32,816 bytes in 1 blocks are definitely lost in loss record 10,005 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7353610: __alloc_dir (opendir.c:207)
    ==4332==    by 0x40B531: lecture_fichiers (lecture_fichier.c:356)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 41,504 (224 direct, 41,280 indirect) bytes in 14 blocks are definitely lost in loss record 10,009 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40D9B4: retourne_save (lecture_fichier.c:1052)
    ==4332==    by 0x40B17F: lecture_fichiers (lecture_fichier.c:283)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 48,536 (40 direct, 48,496 indirect) bytes in 1 blocks are definitely lost in loss record 10,011 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x4196E6: lire_struct_sort (sorts.c:98)
    ==4332==    by 0x419627: lire_sorts (sorts.c:79)
    ==4332==    by 0x40AD29: lecture_fichiers (lecture_fichier.c:235)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 48,536 (40 direct, 48,496 indirect) bytes in 1 blocks are definitely lost in loss record 10,012 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40DFC2: lire_struct_armes (lecture_fichier.c:1147)
    ==4332==    by 0x40B215: lecture_fichiers (lecture_fichier.c:297)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 48,536 (40 direct, 48,496 indirect) bytes in 1 blocks are definitely lost in loss record 10,013 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40E597: lire_struct_armures (lecture_fichier.c:1229)
    ==4332==    by 0x40B4BD: lecture_fichiers (lecture_fichier.c:347)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 48,536 (40 direct, 48,496 indirect) bytes in 1 blocks are definitely lost in loss record 10,014 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x410523: lire_struct_competences (lecture_fichier.c:1767)
    ==4332==    by 0x40BCC6: lecture_fichiers (lecture_fichier.c:487)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 48,624 (40 direct, 48,584 indirect) bytes in 1 blocks are definitely lost in loss record 10,015 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x4196E6: lire_struct_sort (sorts.c:98)
    ==4332==    by 0x4195B1: lire_sorts (sorts.c:71)
    ==4332==    by 0x40AD29: lecture_fichiers (lecture_fichier.c:235)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 66,032 (352 direct, 65,680 indirect) bytes in 22 blocks are definitely lost in loss record 10,026 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40D4AC: retourne_sort (lecture_fichier.c:965)
    ==4332==    by 0x40AF47: lecture_fichiers (lecture_fichier.c:255)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 72,192 (352 direct, 71,840 indirect) bytes in 22 blocks are definitely lost in loss record 10,030 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40F464: retourne_race (lecture_fichier.c:1439)
    ==4332==    by 0x40BA49: lecture_fichiers (lecture_fichier.c:445)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 88,272 (480 direct, 87,792 indirect) bytes in 30 blocks are definitely lost in loss record 10,034 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40E9F9: groupe_armes (lecture_fichier.c:1291)
    ==4332==    by 0x40B319: lecture_fichiers (lecture_fichier.c:314)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 97,072 (80 direct, 96,992 indirect) bytes in 2 blocks are definitely lost in loss record 10,038 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40EE77: retourne_psi (lecture_fichier.c:1354)
    ==4332==    by 0x40B66F: lecture_fichiers (lecture_fichier.c:369)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 181,720 (928 direct, 180,792 indirect) bytes in 58 blocks are definitely lost in loss record 10,045 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x6DCF799: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE66AF: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DE6C7D: g_slice_alloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCB824: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x6DCD955: g_markup_parse_context_parse (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
    ==4332==    by 0x417DB1: g_markup_dom_new (xml.c:460)
    ==4332==    by 0x40BD2E: retourne_classe (lecture_fichier.c:501)
    ==4332==    by 0x40B7CB: lecture_fichiers (lecture_fichier.c:399)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 242,680 (200 direct, 242,480 indirect) bytes in 5 blocks are definitely lost in loss record 10,050 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40E9F9: groupe_armes (lecture_fichier.c:1291)
    ==4332==    by 0x40B433: lecture_fichiers (lecture_fichier.c:335)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 306,984 (280 direct, 306,704 indirect) bytes in 7 blocks are definitely lost in loss record 10,051 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40D9B4: retourne_save (lecture_fichier.c:1052)
    ==4332==    by 0x40B17F: lecture_fichiers (lecture_fichier.c:283)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 485,648 (440 direct, 485,208 indirect) bytes in 11 blocks are definitely lost in loss record 10,055 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40F464: retourne_race (lecture_fichier.c:1439)
    ==4332==    by 0x40BA49: lecture_fichiers (lecture_fichier.c:445)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 624,800 (440 direct, 624,360 indirect) bytes in 11 blocks are definitely lost in loss record 10,056 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40D4AC: retourne_sort (lecture_fichier.c:965)
    ==4332==    by 0x40AF47: lecture_fichiers (lecture_fichier.c:255)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 695,272 (600 direct, 694,672 indirect) bytes in 15 blocks are definitely lost in loss record 10,057 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40E9F9: groupe_armes (lecture_fichier.c:1291)
    ==4332==    by 0x40B319: lecture_fichiers (lecture_fichier.c:314)
    ==4332==    by 0x42560C: main (main.c:20)
    ==4332== 
    ==4332== 1,319,376 (1,160 direct, 1,318,216 indirect) bytes in 29 blocks are definitely lost in loss record 10,059 of 10,059
    ==4332==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
    ==4332==    by 0x7096CE8: zip_fopen_index_encrypted (in /usr/lib/x86_64-linux-gnu/libzip.so.2.1.0)
    ==4332==    by 0x4114E3: content_libo (zip.c:103)
    ==4332==    by 0x417D41: g_markup_dom_new (xml.c:445)
    ==4332==    by 0x40BD2E: retourne_classe (lecture_fichier.c:501)
    ==4332==    by 0x40B7CB: lecture_fichiers (lecture_fichier.c:399)
    ==4332==    by 0x42560C: main (main.c:20)
    Comme tu peux le voir cet extrait se compose de plusieurs blocs. La première ligne de chacun d'entre eux t'indique la taille perdue. En dessous tu as un descriptif avec les lignes de ton code incriminées.

    Il ne faut pas trop s'inquiéter au premier abord. Tu peux avoir un warning sur une allocation tout simplement parce que tu ne libères pas avant de quitter l'application (tu laisses faire le système d'exploitation à ta place). Si tu veux t'astreindre à une programmation stricte il serait bon alors d'allouer/désallouer avant l'arrêt de l'application.

    Utiliser valgrind va te permettre de supprimer les fuites mémoires mais aussi de revisiter tes allocations, ce qui peut te permettre de voir certaines coquilles.

    Histoire d'être complet voila ligne de commande pour avoir un résumé complet : valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --log-file=vgdump ./testLe résultat se trouveras alors dans le fichier vgdump.

    Il y a beaucoup de blocs qui ne concernent que Gtk. N'y prête aucune attention. Ne regarde que ceux qui stipulent des lignes de code de tes fichiers sources.

  18. #38
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    Citation Envoyé par gerald3d Voir le message
    Il y a beaucoup de blocs qui ne concernent que Gtk. N'y prête aucune attention. Ne regarde que ceux qui stipulent des lignes de code de tes fichiers sources.
    Je regarde ton document et pour le moment,
    - soit je ne vois pas où il peut y avoir une fuite de mémoire car il n'y a pas de mémoire réservée.
    - soit je vois la mémoire réservée, mais après il y a la libération de la mémoire
    - soit c'est un tableau si sera utile tant que le programme ne sera pas terminé.

    J'avoue que c'est long et pénible. Est-ce que c'est bien valable comme vérification ? Il est vrai qu'une fuite mémoire n'est pas agréable, mais la, ça fait beaucoup de travail pour pas grand chose jusqu'à maintenant.

    Je viens d'installer valgrind et j'ai la surprise de ne pas voir les même choses que toi !

    Sur un onglet je lance ta commande et sur l'autre :
    C'est très lent. Je continuera de regarder dès que j'aurais le temps.
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

  19. #39
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Oui ca peut être fastidieux j'en conviens. Et oui ton application va ramer à mort puisqu'elle passe à travers Valgrind. Mais c'est pour la bonne cause.

    Si je reprends le dernier bloc il semblerait qu'il y ait un problème avec la fonction g_markup_dom_new(); :
    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
    GMarkupDomNode *g_markup_dom_new (const gchar *filename, GError **error)
    {
      GMarkupParseContext *markup_parse_context;
      GMarkupDomNode * pere = (GMarkupDomNode *)g_malloc(sizeof(GMarkupDomNode));
       /* pere doit être alloué dynamiquement car il est utilisé par la fonction appelante */
      GMarkupDomContext context={0,0,pere,pere};
       /* ce n'est pas le cas de context qui n'est utilisé que les fonctions appelées  */
    
      pere->nom=NULL; /* initialisation de la racine du fichier xml */
      pere->niveau=0;
      pere->item=0;
      pere->texte=NULL;
      pere->nb_texte=0;
      pere->attributs=NULL;
      pere->nb_att=0;
      pere->com=NULL;
      pere->nb_com=0;
      pere->parent=NULL;
      pere->fils=NULL;
      pere->nb_fils=0;
    
      g_return_val_if_fail (filename != NULL, context.root);
                      /* sort de la fonction si filename ne pointe pas sur une chaîne de caractères */
    ...
    Tu alloues d'entrée de jeu sans faire aucun test. Puis plus loin tu sors si une condition n'est pas remplie. À ce moment là tu renvoies context.root. Que fais-tu de l'allocation de pere ?

  20. #40
    Rédacteur/Modérateur
    Avatar de troumad
    Homme Profil pro
    Enseignant
    Inscrit en
    Novembre 2003
    Messages
    5 597
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Enseignement

    Informations forums :
    Inscription : Novembre 2003
    Messages : 5 597
    Points : 7 832
    Points
    7 832
    Par défaut
    OK... Ce fichier...
    As-tu lu son entête ?
    [supprimer]Ceci dit, j'ai mis en ligne une version corrigée.[/supprimer]
    Je suis bien gène par celui-ci : le g_return_val_if_fail utilise la variable context qui a besoin de la variable pere, le troisième champ en plus qui est bien la variable père. Il va falloir que je regarde de plus près

    Je l'ai récupéré sur developpez.com, un peu débogué et surtout expliqué : http://troumad.developpez.com/C/gtk/gtk_xml/ tout en y rajoutant quelques fonctions. Je corrige
    Modérateur Mageia/Mandriva Linux
    Amicalement VOOotre
    Troumad Alias Bernard SIAUD à découvrir sur http://troumad.org
    Mes tutoriels : xrandr, algorigramme et C, xml et gtk...

Discussions similaires

  1. Réponses: 12
    Dernier message: 18/01/2010, 18h20
  2. Utiliser des variables statiques pour des paramètres
    Par el_slapper dans le forum VB.NET
    Réponses: 4
    Dernier message: 11/03/2008, 08h55
  3. Recherche des enregistrements en fonction des paramètres
    Par infoctet dans le forum MS SQL Server
    Réponses: 3
    Dernier message: 10/01/2007, 09h51
  4. Réponses: 1
    Dernier message: 22/06/2006, 11h08

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo