On Wed, 12 Jul 2023 at 15:50, Hanna Czenczek <hre...@redhat.com> wrote:
> There was and is no fix for the Coverity warning.  I have mentioned that
> warning because the question as to why the code uses
> bdrv_check_qiov_request() came in the context of discussing it
> (https://lists.nongnu.org/archive/html/qemu-devel/2023-06/msg01809.html).
>
> I’m not planning on fixing the Coverity warning in the code. `assert(x
> <= SIZE_MAX)` to me is an absolutely reasonable piece of code, even if
> always true (on some platforms), in fact, I find it a good thing if
> asserted conditions are always true, not least because then the compiler
> can optimize them out.  I don’t think we should make it more complicated
> to make Coverity happier.

Yep, I agree on that -- Coverity is bad about asserts and other
conditions that are there for one particular config or host
setup and only happen to be always-true on the config it scans with.
The simplest thing is to mark them as false-positives.

-- PMM

Reply via email to