Bonjour à tous,
j'ai des warnings j'arrive pas à identifier le problème d'ou, mais apparemment c'est localtime il attend un parametre (const time_t * ), Avez-vous une idée qu'est ce que je dois remplacer ?
attention : passing argument 1 of ‘localtime’ makes pointer from integer without a cast [enabled by default]
/usr/include/time.h:237:19: note: expected ‘const time_t *’ but argument is of type ‘time_t’
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 time_t date_modification(char *file){ struct stat st; if ( stat(file, &st) < 0 ){ perror("stat() in type_fichier: \n"); } return st.st_mtime; } // j'ai une autre fonction que j'utilise pour comparer la date de deux fichier int comparer_date(fichier1,fichier2){ ... struct tm *tm_src ; tm_src = localtime(get_date_modification(fichier1)) // ici! !! ... }







Répondre avec citation
Partager