antirez / load81

SDL based Lua programming environment for kids similar to Codea
BSD 2-Clause "Simplified" License
647 stars 64 forks source link

Remove warnings when compiling with GCC 10.2.1 20201203 on Linux, fix #66 #67

Open AlbertoGP opened 2 years ago

AlbertoGP commented 2 years ago

This leaves only one warning:

/usr/bin/ld: liblua.a(loslib.o): in function `os_tmpname':
loslib.c:(.text+0x4e4): warning: the use of `tmpnam' is dangerous, better use `mkstemp'

There is a note about this in lua/src/luaconf.h:

lua_tmpnam is the function that the OS library uses to create a temporary name. LUA_TMPNAMBUFSIZE is the maximum size of a name created by lua_tmpnam. CHANGE them if you have an alternative to tmpnam (which is considered insecure) or if you want the original tmpnam anyway. By default, Lua uses tmpnam except when POSIX is available, where it uses mkstemp.

If I understand this correctly, when running on Linux it would not use tmpnam anyway. If so, it would be nice to quiet this warning too.