[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cppcheck error in opendir.c

From: Arno Onken
Subject: Re: cppcheck error in opendir.c
Date: Wed, 20 Mar 2013 18:25:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

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

>> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]