Enrico Forestieri wrote:
> I recently started seeing the following warning while building:
>
> ../../../src/support/docstring.C: In member function `wctype_t
> lyx::ascii_ctype_facet::M_convert_to_wmask(char) const':
> ../../../src/support/docstring.C:269: warning: overflow in implicit
> constant conversion
> Georg, do you have any idea? I cannot see anything wrong with line 269
> in docstring.C and can't figure out what is happening... not to mention
> that I don't know why I am getting the warning. I am sure that I never
> saw it before.
What happens is that in this code
wmask_type M_convert_to_wmask(const mask m) const
{
wmask_type ret;
switch (m) {
case print: ret = wctype("print"); break;
}
return ret;
}
the constant 'print' does not fit into the type of 'm' (which is 'mask').
>From your error message one can see that 'mask' is typedefed to 'char'. On
my linux box it is 'unsigned short'.
I am pretty sure that qt is to blame here and that it defines a global type
'mask', because including qt headers was the only change that happened
recently. If that is the case you can easily fix the problem by full
qualification of 'mask':
std::ctype<lyx::char_type>::mask
Georg