lua-users home
lua-l archive

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

> Also under VC6 compiled fine (just one warning, detailed below).
> I've uploaded the resulting binaries (exe and dll) here:
> The warning is this:
> lua-5.2.0-work2\src\ldo.c(412) : warning C4244: '=' : conversion
> from 'long ' to 'unsigned char ', possible loss of data

Some minimal care from the compiler should avoid this warning. The
line in question is this:

  ci->callstatus = (ci->callstatus & ~(CIST_YPCALL | CIST_STAT)) | CIST_YIELDED;

As ci->callstatus is a (unsigned) char, an '&' of it with anything
surely fits in a char, as does the '|' of that result with a small
constant.  (Moreover, the conversion should not be from 'long', but
from 'int'. Or am I missing something??)

-- Roberto