Patches for xf86-video-{tdfx,trident,xgi}
Johannes Obermayr
johannesobermayr at gmx.de
Thu Jan 12 10:30:21 PST 2012
> Am Freitag, 30. Dezember 2011, 13:07:32 schrieben Sie:
> > > From: Johannes Obermayr <johannesobermayr at gmx.de>
> > > Date: Fri, 30 Dec 2011 12:50:18 +0100
> > >
> > > ---
> > > src/vb_i2c.c | 4 +++-
> > > 1 files changed, 3 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/src/vb_i2c.c b/src/vb_i2c.c
> > > index 96e26e3..6fc95c9 100755
> > > --- a/src/vb_i2c.c
> > > +++ b/src/vb_i2c.c
> > > @@ -1632,6 +1632,7 @@ BOOLEAN bReadClockLine(PXGI_HW_DEVICE_INFO pHWDE)
> > > return(bReadClockLineFCNT(pHWDE));
> > > else
> > > ErrorF("Error(XGI) : Unkonwn output device! \n");
> > > + return FALSE;
> > > }
> > >
> > > BOOLEAN bReadDataLine(PXGI_HW_DEVICE_INFO pHWDE)
> > > @@ -1644,6 +1645,7 @@ BOOLEAN bReadDataLine(PXGI_HW_DEVICE_INFO pHWDE)
> > > return(bReadDataLineFCNT(pHWDE));
> > > else
> > > ErrorF("Error(XGI) : Unkonwn output device! \n");
> > > + return FALSE;
> > > }
> >
> > The indentation is really messed up here. Visually it suggests that
> > the return FALSE is part of the else clause, but there are no curly
> > braces to make it so.
>
> It is part of the else clause because the functions will end and return sth. if one of the former (else)ifs is true.
> return FALSE will be reached only if none of the former (else)ifs is true, also the else part will execute.
>
> If you add curly braces the warning in gcc will not be fixed.
> I assume this is because cases are possible (but not here) where one of the (else)ifs does not lead directly to a return.
>
> If indentation is really messed up here one tab on each return FALSE can be removed.
Ping.
(Also patch for xf86-video-tdfx)
More information about the xorg-devel
mailing list