Re: [RFC v2 02/10] Drop unused static function return values

2022-08-12 Thread Alberto Faria
On Wed, Aug 3, 2022 at 12:15 PM Richard W.M. Jones wrote: > If it helps to think about this, Coverity checks for consistency. > Across the whole code base, is the return value of a function used or > ignored consistently. You will see Coverity errors like: > > Error: CHECKED_RETURN (CWE-252

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-12 Thread Alberto Faria
On Wed, Aug 3, 2022 at 1:30 PM Peter Maydell wrote: > The problem with a patch like this is that it rolls up into a > single patch changes to the API of many functions in multiple > subsystems across the whole codebase. Some of those changes > might be right; some might be wrong. No single person

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Richard W.M. Jones
On Wed, Aug 03, 2022 at 01:25:34PM +0100, Peter Maydell wrote: > On Wed, 3 Aug 2022 at 12:44, Daniel P. Berrangé wrote: > > Inconsistent return value checking is designed-in behaviour for > > QEMU's current Error handling coding pattern with error_abort/fatal. > > Yes; I habitually mark as false-

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Peter Maydell
On Fri, 29 Jul 2022 at 14:09, Alberto Faria wrote: > > Make non-void static functions whose return values are ignored by > all callers return void instead. > > These functions were found by static-analyzer.py. > > Not all occurrences of this problem were fixed. > > Signed-off-by: Alberto Faria >

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Peter Maydell
On Wed, 3 Aug 2022 at 12:44, Daniel P. Berrangé wrote: > Inconsistent return value checking is designed-in behaviour for > QEMU's current Error handling coding pattern with error_abort/fatal. Yes; I habitually mark as false-positive Coverity reports about missing error checks where it has not not

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Daniel P . Berrangé
On Wed, Aug 03, 2022 at 12:15:20PM +0100, Richard W.M. Jones wrote: > On Wed, Aug 03, 2022 at 12:07:19PM +0100, Alberto Faria wrote: > > On Wed, Aug 3, 2022 at 11:46 AM Dr. David Alan Gilbert > > wrote: > > > > > > * Alberto Faria (afa...@redhat.com) wrote: > > > > Make non-void static functions w

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Richard W.M. Jones
On Wed, Aug 03, 2022 at 12:07:19PM +0100, Alberto Faria wrote: > On Wed, Aug 3, 2022 at 11:46 AM Dr. David Alan Gilbert > wrote: > > > > * Alberto Faria (afa...@redhat.com) wrote: > > > Make non-void static functions whose return values are ignored by > > > all callers return void instead. > > > >

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Alberto Faria
On Wed, Aug 3, 2022 at 11:46 AM Dr. David Alan Gilbert wrote: > > * Alberto Faria (afa...@redhat.com) wrote: > > Make non-void static functions whose return values are ignored by > > all callers return void instead. > > > > These functions were found by static-analyzer.py. > > > > Not all occurren

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Daniel P . Berrangé
On Wed, Aug 03, 2022 at 11:46:26AM +0100, Dr. David Alan Gilbert wrote: > * Alberto Faria (afa...@redhat.com) wrote: > > Make non-void static functions whose return values are ignored by > > all callers return void instead. > > > > These functions were found by static-analyzer.py. > > > > Not all

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Dr. David Alan Gilbert
* Alberto Faria (afa...@redhat.com) wrote: > Make non-void static functions whose return values are ignored by > all callers return void instead. > > These functions were found by static-analyzer.py. > > Not all occurrences of this problem were fixed. > > Signed-off-by: Alberto Faria > diff

[RFC v2 02/10] Drop unused static function return values

2022-07-29 Thread Alberto Faria
Make non-void static functions whose return values are ignored by all callers return void instead. These functions were found by static-analyzer.py. Not all occurrences of this problem were fixed. Signed-off-by: Alberto Faria --- accel/kvm/kvm-all.c | 12 ++--- accel/tcg/