Noob here.
gcc complains by stating:
warning: unused parameter ‘status’
1. I do not use stat, so how can I rewrite to omit it ?
2. Can it be rewritten so it can all be done in main rather than calling a function ?
gcc complains by stating:
warning: unused parameter ‘status’
1. I do not use stat, so how can I rewrite to omit it ?
2. Can it be rewritten so it can all be done in main rather than calling a function ?
Code:
int list(const char *filename, const struct stat *status, int type)
{
if( (type == FTW_F) && strstr(filename, ".txt") )
{
puts(filename);
}
return 0;
}
int main{
ftw("path-to-folder", list, 1);
return 0;
}