On 03/20/2013 05:54 PM, Paul Eggert wrote: > On 03/20/13 09:38, Arno Onken wrote: >> It is explained in the second post on the bug tracker: > > Sorry, I don't know the bug tracker in question.
Sorry. It's at http://sourceforge.net/apps/trac/cppcheck/ticket/4670 >> Comment(by amai): >> >> Well, I am just looking at lib/opendir.c - and I have no idea about the >> correlation of involved macros ''HAVE_OPENDIR'' and ''REPLACE_FCHDIR'' ... >> So ''ifndef HAVE_OPENDIR'' and ''#ifdef REPLACE_FCHDIR'' cppcheck is >> right, ''dirp'' is allocated by ''malloc()'' and passed to ''closedir()''. > > But in that case, closedir is implemented via malloc, no? > So it should be OK. We are talking about the *implementation* > of opendir here, so there should be some license for it to > know DIR internals. I don't have any intuition for the workings of opendir. I just assumed that the suggestion by Daniel Marjamaki would be reasonable and silence the error message. Sorry for the noise.