lua-users home
lua-l archive

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


> 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