MSVC 2015 Error C2397: conversion from 'double' to 'FLOAT' requires a narrowing conversion

Khaled Hosny khaledhosny at eglug.org
Sat Oct 29 22:23:48 UTC 2016


On Sat, Oct 29, 2016 at 09:08:29PM +0000, Luke Benes wrote:
> I'm now getting the following error when I build with MSVC 2015:
> 
> [build CXX] vcl/win/gdi/winlayout.cxx
> C:/core/vcl/win/gdi/winlayout.cxx(3533): error C2397: conversion from 'double' to 'FLOAT' requires a narrowing conversion
> C:/core/solenv/gbuild/LinkTarget.mk:189: recipe for target 'C:/core/workdir/CxxObject/vcl/win/gdi/winlayout.o' failed
> make[1]: *** [C:/core/workdir/CxxObject/vcl/win/gdi/winlayout.o] Error 2
> make[1]: *** Waiting for unfinished jobs....
> Makefile:266: recipe for target 'build' failed
> make: *** [build] Error 2
> 
> It looks like the source of the failure is: 
> https://cgit.freedesktop.org/libreoffice/core/commit/?id=3d456dfa6637c6c3ebe7a21f1f1a5b05039cee2a
> 
> with
> 3533:      mpRT->DrawGlyphRun({ baseline.x, baseline.y + nYDiff }, &glyphs, pBrush);

I can’t reproduce the error here (MSVC 2013), but can try to change
nYDiff (few lines above) from double to FLOAT and see if it fixes the
issue?

Regards,
Khaled


More information about the LibreOffice mailing list