Fixed various warnings.
This commit is contained in:
parent
c505cc0270
commit
d48265348a
|
@ -122,7 +122,7 @@ void nodemcu_init(void)
|
|||
flash_rom_set_size_byte(flash_safe_get_size_byte());
|
||||
|
||||
// Reboot to get SDK to use (or write) init data at new location
|
||||
system_restart ();
|
||||
esp_restart ();
|
||||
|
||||
// Don't post the start_lua task, we're about to reboot...
|
||||
return;
|
||||
|
|
|
@ -649,7 +649,7 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
|
|||
|
||||
#else
|
||||
|
||||
#include C_HEADER_FCNTL
|
||||
#include <fcntl.h>
|
||||
|
||||
typedef struct LoadFSF {
|
||||
int extraline;
|
||||
|
@ -688,7 +688,7 @@ static int errfsfile (lua_State *L, const char *what, int fnameindex) {
|
|||
|
||||
LUALIB_API int luaL_loadfsfile (lua_State *L, const char *filename) {
|
||||
LoadFSF lf;
|
||||
int status, readstatus;
|
||||
int status;
|
||||
int c;
|
||||
int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */
|
||||
lf.extraline = 0;
|
||||
|
|
|
@ -603,6 +603,7 @@ static void createmeta (lua_State *L) {
|
|||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static void createstdfile (lua_State *L, int f, int k, const char *fname) {
|
||||
*newfile(L) = f;
|
||||
#if LUA_OPTIMIZE_MEMORY != 2
|
||||
|
@ -619,6 +620,7 @@ static void createstdfile (lua_State *L, int f, int k, const char *fname) {
|
|||
lua_setfield(L, -2, fname);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LUA_OPTIMIZE_MEMORY != 2
|
||||
static void newfenv (lua_State *L, lua_CFunction cls) {
|
||||
|
|
|
@ -128,15 +128,14 @@ static int docall (lua_State *L, int narg, int clear) {
|
|||
|
||||
|
||||
static void print_version (lua_State *L) {
|
||||
lua_pushliteral (L, NODE_VERSION " build " BUILD_DATE " powered by " LUA_RELEASE " on IDF ");
|
||||
lua_pushstring (L, system_get_sdk_version ());
|
||||
lua_concat (L, 2);
|
||||
lua_pushliteral (L, NODE_VERSION " build " BUILD_DATE " powered by " LUA_RELEASE);
|
||||
const char *msg = lua_tostring (L, -1);
|
||||
l_message (NULL, msg);
|
||||
lua_pop (L, 1);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static int getargs (lua_State *L, char **argv, int n) {
|
||||
int narg;
|
||||
int i;
|
||||
|
@ -154,7 +153,6 @@ static int getargs (lua_State *L, char **argv, int n) {
|
|||
return narg;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int dofile (lua_State *L, const char *name) {
|
||||
int status = luaL_loadfile(L, name) || docall(L, 0, 1);
|
||||
return report(L, status);
|
||||
|
@ -477,7 +475,7 @@ void donejob(lua_Load *load){
|
|||
}
|
||||
|
||||
static void dojob(lua_Load *load){
|
||||
size_t l, rs;
|
||||
size_t l;
|
||||
int status;
|
||||
char *b = load->line;
|
||||
lua_State *L = load->L;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// Lua: heap()
|
||||
static int node_heap( lua_State* L )
|
||||
{
|
||||
uint32_t sz = system_get_free_heap_size();
|
||||
uint32_t sz = esp_get_free_heap_size();
|
||||
lua_pushinteger(L, sz);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue