On Mon, 18 May 2020 at 12:20, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > On 5/18/20 11:46 AM, Peter Maydell wrote: > > Not necessarily a bad idea, but don't we have an awful > > lot of places that ignore the result that we'd need > > to fix first? > > Yes, there are various places to fix. I wanted to have a preview first, > and not start working on this if it is later rejected. Most of the cases > are hardware specific and require studying each hardware behavior.
Well, patches that fix "we should check and handle errors but we don't" bugs are pretty uncontroversial. How ugly does the code for "call the function and deliberately ignore the result in a way that doesn't trigger the warning" look ? Assuming it's reasonably straightforward to write code for a device that really does ignore the transaction status then I don't think that there would be a problem with adding the warn-unused-result attributes, if and when we got all the existing instances fixed. The other part of this is really just priorities: it seems likely that a lot of the places which ignore the return code are going to be in devices which we don't care strongly about, so if fixing them all is going to take a long time because we have to look up the details of dozens of obscure bits of hardware, then maybe there's more important cleanup we might prefer to do first. It depends a bit on whether there are 30 of these callsites, or 3... thanks -- PMM