[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/6] thread.h: Fix Coverity version of qemu_cond_timedwait
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2 2/6] thread.h: Fix Coverity version of qemu_cond_timedwait() |
Date: |
Fri, 20 Mar 2020 10:18:01 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 3/19/20 12:33 PM, Peter Maydell wrote:
> For Coverity's benefit, we provide simpler versions of functions like
> qemu_mutex_lock(), qemu_cond_wait() and qemu_cond_timedwait(). When
> we added qemu_cond_timedwait() in commit 3dcc9c6ec4ea, a cut and
> paste error meant that the Coverity version of qemu_cond_timedwait()
> was using the wrong _impl function, which makes the Coverity parser
> complain:
>
> "/qemu/include/qemu/thread.h", line 159: warning #140: too many arguments in
> function call
> return qemu_cond_timedwait(cond, mutex, ms);
> ^
>
> "/qemu/include/qemu/thread.h", line 159: warning #120: return value type does
> not match the function type
> return qemu_cond_timedwait(cond, mutex, ms);
> ^
>
> "/qemu/include/qemu/thread.h", line 156: warning #1563: function
> "qemu_cond_timedwait" not emitted, consider modeling it or review
> parse diagnostics to improve fidelity
> static inline bool (qemu_cond_timedwait)(QemuCond *cond, QemuMutex *mutex,
> ^
>
> These aren't fatal, but reduce the scope of the analysis. Fix the error.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> include/qemu/thread.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
- [PATCH v2 0/6] Automation of Coverity Scan uploads (via Docker), Peter Maydell, 2020/03/19
- [PATCH v2 1/6] osdep.h: Drop no-longer-needed Coverity workarounds, Peter Maydell, 2020/03/19
- [PATCH v2 2/6] thread.h: Fix Coverity version of qemu_cond_timedwait(), Peter Maydell, 2020/03/19
- [PATCH v2 4/6] linux-user/flatload.c: Use "" for include of QEMU header target_flat.h, Peter Maydell, 2020/03/19
- [PATCH v2 3/6] thread.h: Remove trailing semicolons from Coverity qemu_mutex_lock() etc, Peter Maydell, 2020/03/19
- [PATCH v2 5/6] scripts/run-coverity-scan: Script to run Coverity Scan build, Peter Maydell, 2020/03/19
- [PATCH v2 6/6] scripts/coverity-scan: Add Docker support, Peter Maydell, 2020/03/19