On Mon, Jul 14, 2014 at 1:30 PM, Marc-André Lureau <mlureau@xxxxxxxxxx> wrote:
I don't see allocation failure workarounds here.
----- Original Message -----
> Hi Marc,
>
>
> On Mon, Jul 14, 2014 at 12:19 PM, Marc-André Lureau < mlureau@xxxxxxxxxx >
> wrote:
>
>
> Hi,
>
> All of those changes are OOM conditions. How can we shut coverity on those?
>
> Yes, there is a simple way and that's what we have in Evolution Data Server.
> Long story short, we can just add some comments in the code like: /*
> coverity[unchecked_value] */
> Please, take a look on:
> https://git.gnome.org/browse/evolution-data-server/commit/?id=a317be96dcffe6ce2c5900fe4e76d955e2294ce9
The workaround would be adding something like this:
/* We don't handle OOM conditions in spice-gtk */
/* coverity[null_returns] */
> Can I go for it?For consistency, I would prefer to avoid checking for allocation failures.
Also using glib API for allocations for the same reason.
Could malloc & free do not have annotations like the glib ones.
>
> Why does it warn here and not for other allocations?
>
> Hmmm. I don't know, maybe these are the cases where we are using the members
> of the structure right after the allocation fail, but it's just a guess.
>
What happens for example if you replace malloc() by g_malloc(), and free() by g_free() in the function below?
I don't think that would help as one of the Coverity's complaints came from: "data = "" * d->area.height * 3);"
Best Regards,
-- Fabiano Fidêncio
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel