On 03/19/2013 08:57 PM, Paul Eggert wrote:
> On 03/19/13 11:59, Arno Onken wrote:
>> cppcheck version 1.58 reports the following error on the latest
>> Savannah respository checkout of gnulib (last change Tue, 19 Mar 2013
>> 17:47:12 +0000):
>>
>> [lib/opendir.c:140]: (error) Mismatching allocation and deallocation: dirp
> 
> I don't see why this diagnostic was generated.
> Maybe a bug in cppcheck?

I reported this on the cppcheck bug tracker and a solution was proposed.
The following code in opendir.c silences cppcheck:

{{{
#if !defined(HAVE_OPENDIR) && defined(REPLACE_FCHDIR)
#error Invalid configuration!!
#endif
}}}

See
http://sourceforge.net/apps/trac/cppcheck/ticket/4670#comment:3

Reply via email to