> -----Original Message-----
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo
> Bonzini
> Sent: Wednesday, May 28, 2014 4:01 PM
> To: Gonglei (Arei); qemu-devel@nongnu.org
> Cc: kw...@redhat.com; peter.crosthwa...@xilinx.com; Huangweidong (C);
> stefa...@redhat.com; m...@redhat.com; Luonengjun; arm...@redhat.com;
> lcapitul...@redhat.com; qiaonuo...@cn.fujitsu.com; av1...@comtv.ru;
> kra...@redhat.com; aligu...@amazon.com; crobi...@redhat.com;
> ler...@redhat.com; afaer...@suse.de
> Subject: Re: [PATCH 6/8] smbus: Fix unreachable code in smb_transaction()
> 
> Il 28/05/2014 02:59, Gonglei (Arei) ha scritto:
> >>> > > -    abort();
> >> >
> >> > This is intentional defensive programming.  A "break" from the switch
> >> > would be wrong, hence the "abort" here.
> >> >
> > But the "break" is unreachable at all case conditions.
> > All those cases will goto data8/data16/done/error.
> 
> Of course, otherwise we'd have a bug.  The abort() ensures that this
> remains the case in the future as well.
> 
I see. Thanks!

Best regards,
-Gonglei

Reply via email to