On 19/04/2017 17:48, Eric Blake wrote:
>> bool block_job_user_paused(BlockJob *job)
>> {
> Is it worth using some form of attribute((nonnull)) annotations on
> various functions, to both state our intentions and let compilers help
> us catch obvious places where we are violating our intentions? That's
> more of a generic question to all of qemu, and doesn't affect your
> particular patch, other than your patch is an instance where the
> annotation would be useful if we wanted to use them.
What kind of bug would the compiler catch? I suppose Coverity would
catch all of them, and maybe -flto would as well.
Paolo
>> - return job ? job->user_paused : 0;
>> + return job->user_paused;