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

Bug#366633: FTBFS with GCC 4.2: invalid conversion from 'int' to 'khtml::EBorderStyle'



On Tuesday 09 May 2006 19:15, Martin Michlmayr wrote:
> Package: kdelibs
> Version: 4:3.5.2-2
>
> Your package fails to build with GCC 4.2.  Version 4.2 has not been
> released yet but I'm building with a snapshot in order to find errors
> and give people an advance warning.  The bug below appears to be in
> your package and not because I'm using a snapshot of the compiler so
> please take a look at it.  You can reproduce this with the
> gcc-snapshot package.
>
> > Automatic build of kdelibs_4:3.5.2-2 on test.track.rz.uni-augsburg.de
> > by sbuild/powerpc 0.44
>
> ...
>
> >  g++ -DHAVE_CONFIG_H -I. -I/build/tbm/kdelibs-3.5.2/./khtml/misc
> > -I../.. -I../../dcop -I../../kdecore -I../../kio/kssl -I../../kjs
> > -I/build/tbm/kdelibs-3.5.2/. -I/build/tbm/kdelibs-3.5.2/./dcop
> > -I/build/tbm/kdelibs-3.5.2/./kio -I/build/tbm/kdelibs-3.5.2/./libltdl
> > -I/build/tbm/kdelibs-3.5.2/./khtml -I/build/tbm/kdelibs-3.5.2/./kutils
> > -I/build/tbm/kdelibs-3.5.2/./dcop -I/build/tbm/kdelibs-3.5.2/./libltdl
> > -I/build/tbm/kdelibs-3.5.2/./kdefx -I../../kdecore
> > -I/build/tbm/kdelibs-3.5.2/./kdecore
> > -I/build/tbm/kdelibs-3.5.2/./kdeui -I/build/tbm/kdelibs-3.5.2/./kio
> > -I/build/tbm/kdelibs-3.5.2/./kio/kio
> > -I/build/tbm/kdelibs-3.5.2/./kio/kfile -I/build/tbm/kdelibs-3.5.2/.
> > -I/usr/share/qt3/include -I. -I/usr/include/kde -DQT_THREAD_SUPPORT
> > -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500
> > -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W
> > -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -g -Wall -O2
> > -DDEBIAN_VERSION=4:3.5.2-2 -Wformat-security
> > -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions
> > -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST
> > -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -c
> > libkhtmlmisc_la.all_cpp.cpp  -fPIC -DPIC -o
> > .libs/libkhtmlmisc_la.all_cpp.o
> > /build/tbm/kdelibs-3.5.2/./khtml/rendering/render_style.h: In member
> > function 'khtml::EBorderStyle khtml::CollapsedBorderValue::style()
> > const': /build/tbm/kdelibs-3.5.2/./khtml/rendering/render_style.h:267:
> > warning: enumeral and non-enumeral type in conditional expression
> > /build/tbm/kdelibs-3.5.2/./khtml/rendering/render_style.h:267: error:
> > invalid conversion from 'int' to 'khtml::EBorderStyle' make[4]: ***
> > [libkhtmlmisc_la.all_cpp.lo] Error 1

The line that causes the error is this:
    EBorderStyle style() const { return border ? border->style : BHIDDEN; }

But BHIDDEN is declared in the EBorderStyle enum, and border is a pointer 
to an object of class BorderStyle, which has a member style declared like 
this:
    EBorderStyle style : 6;

As far as I can tell, both possible return values are of type EBorderStyle, 
so I don't see where the problematic conversion from int to EBorderStyle 
happens.

Josh



Reply to: