Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: HEADS UP: riastradh-drm2 branch merged
On Fri, Mar 21, 2014 at 08:05:06PM -0400, David H. Gutteridge wrote:
> > With amd64, I hit this:
> >
> > /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:
> > In function 'do_cvt_mode':
> > /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:1399:13:
> > error: 'width' may be used uninitialized in this function
> > [-Werror=maybe-uninitialized]
> > newmode = drm_cvt_mode(dev, width, height,
> > ^
> > In file included from
> > /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:30:0:
> > /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:1375:25:
> > note: 'width' was declared here
> > int uninitialized_var(width), height;
> > ^
> > /usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/kernel.h:47:30:
> > note: in definition of macro 'uninitialized_var'
> > #define uninitialized_var(x) x
> > ^
> > cc1: all warnings being treated as errors
> > *** [drm_edid.o] Error code 1
> >
> > I assume this must simply be fallout from GCC being upgraded to 4.8.3.
>
> After the commit referenced below, I'm able to build the amd64 kernel.
>
> Regards,
>
> Dave
>
> Module Name: src
> Committed By: riastradh
> Date: Fri Mar 21 02:25:05 UTC 2014
>
> Modified Files:
> src/sys/external/bsd/drm2/include/linux: kernel.h
>
> Log Message:
> Make uninitialized_var kludge expand to `x = 0'.
>
> Forgot to commit this the other day.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/include/linux/kernel.h
I'd add a 'default' to the switch statement.
gcc doesn't detect when switch statements have case terms for
all possible values of a masked value.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index