[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.2 (rc3) now available
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Fri, 15 Mar 2013 17:18:59 +0000
2013/3/15 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
>> ...\lua-5.2.2\src\lgc.c(453) : warning C4334: '<<' : result of 32-bit
>> shift implicitly converted to 64 bits (was 64-bit shift intended?)
>
> How can we answer "no, it was not"?
>
> Does this solve it?
>
> - sizeof(Node) * sizenode(h);
> + sizeof(Node) * (int)sizenode(h);
This doesn't work
> Or maybe this?
>
> - sizeof(Node) * sizenode(h);
> + sizeof(Node) * (size_t)sizenode(h);
This *does* work.
>> And when linking (despite the Cxxxx code, I use /LTCG) I get this warning:
>>
>> ...\lua-5.2.2\src\loadlib.c(187) : warning C4700: uninitialized local
>> variable 'buffer' used
>
> Let us see:
>
> char buffer[128];
> if (FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,
> NULL, error, 0, buffer, sizeof(buffer)/sizeof(char), NULL))
> lua_pushstring(L, buffer);
>
> MS documentation says 'buffer' is an _Out_ parameter [1]. What can we do?
Actually, I was mistaken for that one, I have a patch that change the
buffer variable to something else, and the message is probably because
of that. I think the unpatched version should work. Sorry for the
noise.