qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL v2 00/61] Misc patches for soft freeze


From: Stefan Hajnoczi
Subject: Re: [PULL v2 00/61] Misc patches for soft freeze
Date: Tue, 17 Mar 2020 14:26:35 +0000

On Tue, Mar 17, 2020 at 01:02:48PM +0100, Philippe Mathieu-Daudé wrote:
> Cc'ing Stefan
> 
> On 3/17/20 12:03 PM, Peter Maydell wrote:
> > On Mon, 16 Mar 2020 at 22:07, Paolo Bonzini <address@hidden> wrote:
> > > 
> > > The following changes since commit 
> > > a98135f727595382e200d04c2996e868b7925a01:
> > > 
> > >    Merge remote-tracking branch 
> > > 'remotes/kraxel/tags/vga-20200316-pull-request' into staging (2020-03-16 
> > > 14:55:59 +0000)
> > > 
> > > are available in the git repository at:
> > > 
> > > 
> > >    git://github.com/bonzini/qemu.git tags/for-upstream
> > > 
> > > for you to fetch changes up to 9d04fea181318684a899fadd99cef7e04097456b:
> > > 
> > >    hw/arm: Let devices own the MemoryRegion they create (2020-03-16 
> > > 23:02:30 +0100)
> > > 
> > > ----------------------------------------------------------------
> > > * Bugfixes all over the place
> > > * get/set_uint cleanups (Felipe)
> > > * Lock guard support (Stefan)
> > > * MemoryRegion ownership cleanup (Philippe)
> > > * AVX512 optimization for buffer_is_zero (Robert)
> > 
> > Hi; this generates a new warning on netbsd:
> > 
> > /home/qemu/qemu-test.N42OXz/src/util/qemu-timer.c: In function
> > 'timerlist_expired':
> > /home/qemu/qemu-test.N42OXz/src/util/qemu-timer.c:197:12: warning:
> > 'expire_time' may be used uninitialized in this function
> > [-Wmaybe-uninitialized]
> >       return expire_time <= qemu_clock_get_ns(timer_list->clock->type);
> >              ^
> > /home/qemu/qemu-test.N42OXz/src/util/qemu-timer.c: In function
> > 'timerlist_deadline_ns':
> > /home/qemu/qemu-test.N42OXz/src/util/qemu-timer.c:235:11: warning:
> > 'expire_time' may be used uninitialized in this function
> > [-Wmaybe-uninitialized]
> >       delta = expire_time - qemu_clock_get_ns(timer_list->clock->type);
> >             ^
> > 
> > This is probably just the compiler being not smart enough
> > to figure out that there's no code path where it's not
> > initialized.

Yes, looks like the compiler can't figure out the control flow on
NetBSD.

We could drop the WITH_QEMU_LOCK_GUARD() macro and use this idiom
instead:

  {
      QEMU_LOCK_GUARD(&mutex);
      ...
  }

But it's unusual for C code to create scopes without a statement (for,
if, while).

Opinions?

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]