qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] tests/hd-geo-test: Don't pass NULL to unlink()


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] tests/hd-geo-test: Don't pass NULL to unlink()
Date: Tue, 6 Sep 2016 20:52:17 +0100

On 6 September 2016 at 20:15, John Snow <address@hidden> wrote:
> Well, I know some have religious arguments against making sanitizers happy,
> but that's not my religion.
>
> If some systems appear to think that unlink must take a nonnull argument, I
> think that's a bug -- but making the sanitizer happy doesn't cost us much
> either IMO.

POSIX doesn't mandate that unlink() handles NULL, so it's just
a quality-of-implementation issue in the library to handle it
without barfing (or conversely a QoI issue to over-conservatively
mark it as requires-nonnull in the system headers, if you like).

In any case my general view with all these sanitizing/lint tools
is that it's usually worth taking a few unnecessary-looking
detours in order to get to zero-warnings so you can easily
flag up when new code triggers a warning (which could well
be a bug).

> (And it's /just/ a test.)
>
> So, personally:
>
> Reviewed-by: John Snow <address@hidden>

Thanks!

-- PMM



reply via email to

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