lua-users home
lua-l archive

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


Warnings from vs 2013 community eidtion with amost all warnings turned on. Compiled source from lua-5.3.0-rc2.tar.gz

Compilation for win32 dll.
Command line options:
/GS /GL /analyze- /Wall /wd"4711" /wd"4820" /Gy /Zc:wchar_t /Gm- /Ox /Ob2 /Fd"C:\work\lua\int\luadll\Release\x86\vc120.pdb" /fp:precise /D "LUA_COMPAT_ALL" /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "LUA_BUILD_AS_DLL" /D "_WINDLL" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /Gd /Oy /Oi /MD /Fa"C:\work\lua\int\luadll\Release\x86\" /EHsc /nologo /Fo"C:\work\lua\int\luadll\Release\x86\" /Ot /Fp"C:\work\lua\int\luadll\Release\x86\lua53.pch"

Warnigns:
lapi.c(863): warning C4242: '=' : conversion from 'const int' to 'lu_byte', possible loss of data
lapi.c(1052): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lauxlib.c(614): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lauxlib.c(664): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lcode.c(298): warning C4242: '+=' : conversion from 'int' to 'lu_byte', possible loss of data
lcode.c(752): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lcode.c(753): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
lcode.c(765): warning C4127: conditional _expression_ is constant
lcode.c(966): warning C4244: '=' : conversion from 'int' to 'lu_byte', possible loss of data
ldo.c(328): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
ldo.c(359): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
ldo.c(594): warning C4242: '=' : conversion from 'int' to 'unsigned short', possible loss of data
lgc.c(202): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lgc.c(806): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lgc.c(1021): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
liolib.c(385): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
liolib.c(474): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
liolib.c(481): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
llex.c(60): warning C4310: cast truncates constant value
lparser.c(437): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
lparser.c(438): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
lparser.c(657): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lparser.c(851): warning C4244: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lparser.c(1123): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lparser.c(1128): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
lparser.c(1161): warning C4244: '-=' : conversion from 'int' to 'lu_byte', possible loss of data
lstring.c(155): warning C4310: cast truncates constant value
lstring.c(173): warning C4310: cast truncates constant value
lstring.c(179): warning C4242: '=' : conversion from 'const int' to 'lu_byte', possible loss of data
lstrlib.c(98): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lstrlib.c(111): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lstrlib.c(1155): warning C4310: cast truncates constant value
lvm.c(381): warning C4310: cast truncates constant value
lapi.c(1090): warning C4702: unreachable code
loslib.c(222): warning C4702: unreachable code

Compilation for win64 dll.
Command line options:
/GS /GL /Wall /wd"4711" /wd"4820" /Gy /Zc:wchar_t /Gm- /Ox /Ob2 /Fd"C:\work\lua\int\luadll\Release\x64\vc120.pdb" /fp:precise /D "LUA_COMPAT_ALL" /D "LUA_BUILD_AS_DLL" /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "LUADLL_EXPORTS" /D "_WINDLL" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /Gd /Oy /Oi /MD /Fa"C:\work\lua\int\luadll\Release\x64\" /EHsc /nologo /Fo"C:\work\lua\int\luadll\Release\x64\" /Ot /Fp"C:\work\lua\int\luadll\Release\x64\lua53.pch" 

Warnings:
lapi.c(863): warning C4242: '=' : conversion from 'const int' to 'lu_byte', possible loss of data
lapi.c(1052): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lauxlib.c(614): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lauxlib.c(664): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lcode.c(298): warning C4242: '+=' : conversion from 'int' to 'lu_byte', possible loss of data
lcode.c(752): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lcode.c(753): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
lcode.c(765): warning C4127: conditional _expression_ is constant
lcode.c(966): warning C4244: '=' : conversion from 'int' to 'lu_byte', possible loss of data
ldo.c(328): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
ldo.c(359): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
ldo.c(594): warning C4242: '=' : conversion from 'int' to 'unsigned short', possible loss of data
lgc.c(202): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lgc.c(806): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lgc.c(1021): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
liolib.c(385): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
liolib.c(474): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
liolib.c(481): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lparser.c(437): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
lparser.c(438): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
lparser.c(657): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lparser.c(851): warning C4244: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lparser.c(1123): warning C4242: '=' : conversion from 'int' to 'lu_byte', possible loss of data
lparser.c(1128): warning C4242: '=' : conversion from 'int' to 'short', possible loss of data
lparser.c(1161): warning C4244: '-=' : conversion from 'int' to 'lu_byte', possible loss of data
lstring.c(179): warning C4242: '=' : conversion from 'const int' to 'lu_byte', possible loss of data
lstrlib.c(98): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lstrlib.c(111): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data
lstrlib.c(1155): warning C4310: cast truncates constant value
lapi.c(1090): warning C4702: unreachable code
loslib.c(222): warning C4702: unreachable code


Warnings from Borland C++ 5.5.1 for Windows:

Warning W8004 lapi.c 679: 'mt' is assigned a value that is never used in function lua_getmetatable
Warning W8008 lcode.c 765: Condition is always false in function validop
Warning W8066 lcode.c 765: Unreachable code in function validop
Warning W8057 lobject.c 113: Parameter 'L' is never used in function numarith
Warning W8004 lobject.c 192: 'neg' is assigned a value that is never used in function lua_strx2number
Warning W8072 lstrlib.c 73: Suspicious pointer arithmetic in function str_sub
Warning W8072 lstrlib.c 157: Suspicious pointer arithmetic in function str_byte
Warning W8072 lstrlib.c 599: Suspicious pointer arithmetic in function str_find_aux
Warning W8072 lstrlib.c 608: Suspicious pointer arithmetic in function str_find_aux
Warning W8072 ltable.c 500: Suspicious pointer arithmetic in function luaH_getint
Warning W8065 lua.c 584: Call to function '_isatty' with no prototype in function pmain
Warning W8012 lundump.c 225: Comparing signed and unsigned values in function fchecksize
Warning W8072 lutf8lib.c 81: Suspicious pointer arithmetic in function utflen
Warning W8072 lutf8lib.c 114: Suspicious pointer arithmetic in function codepoint
Warning W8072 lutf8lib.c 115: Suspicious pointer arithmetic in function codepoint
Warning W8072 lutf8lib.c 169: Suspicious pointer arithmetic in function byteoffset
Warning W8072 lutf8lib.c 172: Suspicious pointer arithmetic in function byteoffset
Warning W8072 lutf8lib.c 178: Suspicious pointer arithmetic in function byteoffset
Warning W8072 lutf8lib.c 187: Suspicious pointer arithmetic in function byteoffset
Warning W8072 lutf8lib.c 208: Suspicious pointer arithmetic in function iter_aux
Warning W8072 lutf8lib.c 214: Suspicious pointer arithmetic in function iter_aux

---
wbr, ps