lua-users home
lua-l archive

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


> (Actually I'm not totally sure about it. It could be that the ANSI C 
> standard is saying something that if there is main(int argc, const char* 
> argv[]), then argv[argc] must be NULL, but I can't tell).

Indeed, ANSI C says that argv[argc] must be NULL.
 
> lua-5.2.0\src\lundump.c(196): warning C6385: Invalid data: accessing 
> 'argument 2', the readable size is 'sizeof(char)' bytes, but '18' bytes 
> might be read: Lines: 191, 192, 193, 194, 195, 196

I don't understand this warning.
 
> lua-5.2.0\src\luac.c(93): warning C6387: 'argument 1' might be '0': this 
> does not adhere to the specification for the function 'strcmp': Lines: 

The compiler is wrong here because arg[i] is never NULL when i<argc.

> lua-5.2.0\src\luac.c(183): warning C6387: 'argument 1' might be '0': 
> this does not adhere to the specification for the function 'ferror': 

The compiler is wrong here because D is never NULL at this point.

> lua-5.2.0\src\luac.c(184): warning C6387: 'argument 1' might be '0': 
> this does not adhere to the specification for the function 'fclose': 

Same thing.

Thanks for the reports anyway.