Le 26/07/2016 à 00:15, Uwe Stöhr a écrit :
I found time to compile today's 2.2.x branch. I get this warning that
could and should be avoided:
TextMetrics.cpp
D:\LyXGit\2.2.x\src\RowPainter.cpp(590): warning C4244: 'initializing':
conversion from 'double' to 'int', possible loss of data
[D:\LyXGit\2.2.x\compile-2015\src\LyX.vcxproj]
I agree with "should": when I read this line, it is not obvious to me
that it hides a narrowing and if it does, I do not immediately know
whether it was intended (other than confidence in the author). It
is important to have such warnings.
Regarding "could", I find it too easy for you to say this without
looking at the issue. Jean-Marc introduced a flag that provided the
desired warnings with gcc. But he had to remove it (a22f7b70) because it
caused too many warnings with qt5 headers. I made a quick test and these
warnings are still present.
The solution appears to be using the flag -isystem instead of -I for qt5
headers, but it seems currently impossible to do that properly when
this information is given by pkg-config. So I could not get this idea to
work on my system.
It would be really nice to have these warnings back.