Re: [ANN] Lua 5.3.0 (beta) now available
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (beta) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2014年10月23日 17:39:04 -0200
> A few minor change requests are listed below.
>
> luaconf.h, line 73. Change:
> #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ANSI C functions */
> To:
> #if !defined(_CRT_SECURE_NO_WARNINGS)
> #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ANSI C functions */
> #endif
> Explanation: With an older Microsoft compiler, if _CRT_SECURE_NO_WARNINGS is defined in the command line options, the compiler complains that _CRT_SECURE_NO_WARNINGS is redefined in luaconf.h. If _CRT_SECURE_NO_WARNINGS is not defined on the command line, the compiler complains that 'getenv' is unsafe because it is referenced in stdlib.h which is included before luaconf.h.
OK.
> [...]
> lstrlib.c, line 1142. Change:
> buff[islittle ? i : size - 1 - i] = (n & MC);
> To:
> buff[islittle ? i : size - 1 - i] = (char)(n & MC);
> Explanation: Prevents compiler warning about possible loss of data.
This compiler seems quite dumb :-) How can (n & 0xFF) loose data??
-- Roberto