[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (work2) now available
- From: David Burgess <dabsoft@...>
- Date: Sat, 16 Jan 2010 10:19:19 +1100
The warning goes away in VC9 and VC7.1.
Methinks you are looking at a VC6 quirk.
On 16/1/2010 3:33 AM, Roberto Ierusalimschy wrote:
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??)