|
From: | Manos Pitsidianakis |
Subject: | Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card |
Date: | Fri, 10 Nov 2023 12:44:56 +0200 |
User-agent: | meli 0.8.2 |
On Fri, 10 Nov 2023 12:21, Peter Maydell <peter.maydell@linaro.org> wrote:
This kind of thing is why Coverity's unused-result warning has a lot of false positives. We shouldn't introduce extra code like this to work around the fact that the tooling doesn't understand our error-handling convention (i.e. error_fatal, and the way that some functions report errors both via the return value and also via the Error** argument).
I respect that :). But I personally believe that clinging to C's inadequacies, instead of preventing bugs statically just because it adds some lines of code, is misguided. Proper code should strive to make bugs impossible in the first place. At least that is my perspective and I would like there to be constructive discussions about different approaches in the mailing list. Perhaps something good might come out of it!
[Prev in Thread] | Current Thread | [Next in Thread] |