Review Request 129219: Fix gcc 6.2 compile error.
Ralf Habacker
ralf.habacker at freenet.de
Thu Oct 20 09:31:37 BST 2016
> On Okt. 19, 2016, 11 vorm., Albert Astals Cid wrote:
> > I almost sure you're using an old kdelibs
> >
> > https://github.com/KDE/kdelibs/commit/1e9ba7d00bb870c7f5b7d2af2ccd31799e1b1910 should fix that problem
>
> Ralf Habacker wrote:
> Thanks for this pointer. Taking a look at the implementation: SHOW_ALL looks to be a bit mask of all defined constants, which is currently 0xfff. Is it guaranteed that static casting of 0xffffffff to int returns a valid bit mask in any case and on any compiler ? If so I will discard this request.
>
> Albert Astals Cid wrote:
> This fix has been there for two years in kjs, noone has complained, so it is the correct fix.
>
> And if it's not, you have to bring it up in kjs
>
> https://github.com/KDE/kjs/commit/dadacaf995170f44e6d392fce2c3f6c7e4967989
According to https://en.wikipedia.org/wiki/Two%27s_complement the present fix works because compiler uses two's complement, where the hightest number of unsigned int represents -1 as signed int.
- Ralf
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129219/#review100130
-----------------------------------------------------------
On Okt. 20, 2016, 10:31 vorm., Ralf Habacker wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129219/
> -----------------------------------------------------------
>
> (Updated Okt. 20, 2016, 10:31 vorm.)
>
>
> Review request for kdelibs.
>
>
> Repository: kdelibs
>
>
> Description
> -------
>
> This commit fixes the following error on compiling khtml/ecma/kjs_views.cpp
> In file included from ...khtml/ecma/kjs_traversal.cpp:22:0:
> ...build/khtml/kjs_traversal.lut.h:54:1: error: narrowing conversion
> of '(DOM::NodeFilter::ShowCode)4294967295u' from 'unsigned int' to
> 'int' inside { } [-Wnarrowing]
>
>
> Diffs
> -----
>
> khtml/dom/dom2_traversal.h c09fd5525200648c2f65f8204e2dd03669635f23
>
> Diff: https://git.reviewboard.kde.org/r/129219/diff/
>
>
> Testing
> -------
>
> Compiled with gcc 6.2 at https://build.opensuse.org/public/build/windows:mingw/openSUSE_Factory/x86_64/kdelibs4/_log
>
> Bug has been detected with 4.14.10 and is not fixed in KDE/4.14 branch.
>
>
> Thanks,
>
> Ralf Habacker
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20161020/1435df05/attachment.htm>
More information about the kde-core-devel
mailing list