lua-users home
lua-l archive

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


A few (more notable) warnings reported by ICC-32:

5.1.4 and 5.2.0-work4:
print.c(45): remark #181: argument is incompatible with corresponding
format string conversion
  			printf("\\%03u",(unsigned char)c);
  -- unsigned int?  (also reported by splint)

5.2.0-work4:			                ^
lapi.c(1147): remark #593: variable "p" was set but never used
    Proto *p;
           ^
  -- though suppressed by UNUSED(p) or LUA_USE_APICHECK

related splint warnings:

5.2.0-work4:
src/print.c:189:2: Format argument 1 to printf (%d) expects int gets lu_byte:
                      f->numparams
   src/print.c:188:11: Corresponding format code
src/print.c:190:2: Format argument 4 to printf (%d) expects int gets lu_byte:
                      f->maxstacksize
src/lstrlib.c:761:31: Format argument 1 to sprintf (%d) expects int gets
                         unsigned char: ((unsigned char)(*s))
   src/lstrlib.c:761:27: Corresponding format code
src/lstrlib.c:763:33: Format argument 1 to sprintf (%03d) expects int gets
                         unsigned char: ((unsigned char)(*s))

5.1.4:
                   f->nups == 1
print.c:175:2: Format argument 1 to printf (%d) expects int gets lu_byte:
                  f->numparams
   print.c:174:11: Corresponding format code
print.c:176:2: Format argument 4 to printf (%d) expects int gets lu_byte:
                  f->maxstacksize
   print.c:174:25: Corresponding format code
print.c:176:46: Format argument 6 to printf (%d) expects int gets lu_byte:
                   f->nups


Also, FYI, MSVC++ 2010 (x64) luavs.bat gives warnings below.  (There
are no such warnings in mingw-64.)

5.1.4
lgc.c(288) : warning C4334: '<<' : result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
ltable.c(323) : warning C4334: '<<' : result of 32-bit shift
implicitly converted to 64 bits (was 64-bit shift intended?)
ltable.c(376) : warning C4334: '<<' : result of 32-bit shift
implicitly converted to 64 bits (was 64-bit shift intended?)

5.2.0-work4
lapi.c(88) : warning C4244: 'initializing' : conversion from '__int64'
to 'int', possible loss of data
lauxlib.c(631) : warning C4244: '=' : conversion from 'lua_Integer' to
'int', possible loss of data
ldo.c(180) : warning C4244: 'initializing' : conversion from '__int64'
to 'int', possible loss of data
lgc.c(342) : warning C4334: '<<' : result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
lgc.c(359) : warning C4334: '<<' : result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
lgc.c(391) : warning C4334: '<<' : result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
lgc.c(502) : warning C4244: 'return' : conversion from 'l_mem' to
'int', possible loss of data
lgc.c(568) : warning C4334: '<<' : result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
liolib.c(456) : warning C4244: 'initializing' : conversion from
'lua_Integer' to 'int', possible loss of data
ltable.c(327) : warning C4334: '<<' : result of 32-bit shift
implicitly converted to 64 bits (was 64-bit shift intended?)
ltable.c(375) : warning C4334: '<<' : result of 32-bit shift
implicitly converted to 64 bits (was 64-bit shift intended?)
ltablib.c(23) : warning C4267: 'initializing' : conversion from
'size_t' to 'int', possible loss of data
ltablib.c(94) : warning C4267: 'initializing' : conversion from
'size_t' to 'int', possible loss of data
ltablib.c(121) : warning C4267: 'initializing' : conversion from
'size_t' to 'int', possible loss of data
ltablib.c(299) : warning C4267: 'initializing' : conversion from
'size_t' to 'int', possible loss of data
lua.c(430) : warning C4244: 'initializing' : conversion from
'lua_Integer' to 'int', possible loss of data
luac.c(155) : warning C4244: 'initializing' : conversion from
'lua_Integer' to 'int', possible loss of data
lvm.c(424) : warning C4244: 'initializing' : conversion from '__int64'
to 'int', possible loss of data
lua.c(430) : warning C4244: 'initializing' : conversion from
'lua_Integer' to 'int', possible loss of data
lapi.c(88) : warning C4244: 'initializing' : conversion from '__int64'
to 'int', possible loss of data
lauxlib.c(631) : warning C4244: '=' : conversion from 'lua_Integer' to
'int', possible loss of data
ldo.c(180) : warning C4244: 'initializing' : conversion from '__int64'
to 'int', possible loss of data