Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
d4826534
Commit
d4826534
authored
Nov 27, 2016
by
Johny Mattsson
Browse files
Fixed various warnings.
parent
c505cc02
Changes
5
Hide whitespace changes
Inline
Side-by-side
components/base_nodemcu/user_main.c
View file @
d4826534
...
...
@@ -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
;
...
...
components/lua/lauxlib.c
View file @
d4826534
...
...
@@ -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
;
...
...
components/lua/liolib.c
View file @
d4826534
...
...
@@ -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
)
{
...
...
components/lua/lua.c
View file @
d4826534
...
...
@@ -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
;
...
...
components/modules/node.c
View file @
d4826534
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment