When I am building cppcheck using Ubuntu 18.04 or newer, I am seeing this compiler warning. More reasons for deprecation can be found in manpage of readdir_r Also available from http://man7.org/linux/man-pages/man3/readdir_r.3.html $ man 3 readdir_r Manpage said "It is recommended that applications use readdir(3) instead of readdir_r(). Furthermore, since version 2.24, glibc deprecates readdir_r()." More reasoning continue... Is there any specific reason where readdir_r() must be use by filelister.cpp?...