Hi,
I have a little warning that I am trying to understand but it escapes
me. Perhaps someone can help here.
I have the function read_files() that scans the directory and return
the desired file names after filtering.
I have used the function file_select() to filter out unwanted files
and everything works nicely except that I keep getting the warning:
"warning: passing argument 3 of 'scandir' from incompatible pointer
type"
********
int read_files() {
/* Read directory and find desired files */
/* file_select is used to sort the files and fetch the desired files
*/
return scandir(DIR, &list, file_select, alphasort);
}
int file_select(str uct direct *entry) {
if (strstr(entry->d_name,FILTER1 ) && strstr(entry->d_name,FILTER2 )
&& strstr(entry->d_name,FILTER3 )) {
return TRUE;
} else {
return FALSE;
}
}
Can someone enlighten me please!
/S
I have a little warning that I am trying to understand but it escapes
me. Perhaps someone can help here.
I have the function read_files() that scans the directory and return
the desired file names after filtering.
I have used the function file_select() to filter out unwanted files
and everything works nicely except that I keep getting the warning:
"warning: passing argument 3 of 'scandir' from incompatible pointer
type"
********
int read_files() {
/* Read directory and find desired files */
/* file_select is used to sort the files and fetch the desired files
*/
return scandir(DIR, &list, file_select, alphasort);
}
int file_select(str uct direct *entry) {
if (strstr(entry->d_name,FILTER1 ) && strstr(entry->d_name,FILTER2 )
&& strstr(entry->d_name,FILTER3 )) {
return TRUE;
} else {
return FALSE;
}
}
Can someone enlighten me please!
/S
Comment