Subject: Re: Fixing a few errors and warning detected by coverity

Re: Fixing a few errors and warning detected by coverity

From: Jaap Keuter <jaap.keuter_at_xs4all.nl>
Date: Fri, 03 May 2013 08:11:50 +0200

On 05/02/2013 10:51 PM, Daniel Stenberg wrote:
> On Thu, 2 May 2013, Patrick Valsecchi wrote:
>
>> A colleague ran Coverity (a static analysis tool) against c-ares and fixed a
>> few reported errors and warnings.
>>
>> Please have a look at the attached patch.
>
> Thanks!
>
> There's a large amount of added typecasts for malloc() and a few other void
> pointers in that patch. Why do we need them?
>

Hi,

It's more a matter of taste, allowing implicit casts or not. Coverity can be
tweaked in many many ways to fit your needs.

Since there are so many, it would be beneficial to have a Coverity run without
this checker rule. Then the other changes (for 'real' problems) may stand out
better.

Thanks,
Jaap
Received on 2013-05-03