Skip to content

Commit 3131484

Browse files
author
Luc
committed
Fix some warnings
1 parent 4c24f03 commit 3131484

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

examples/RegisterFunction/RegisterFunction.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
LuaWrapper lua;
44

55
static int myFunction(lua_State *lua_state) {
6+
(void*)lua_state;
67
Serial.println("Hi from my C function");
8+
return 0;
79
}
810

911
void setup() {

src/LuaWrapper.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@ extern "C" {
55
int a = luaL_checkinteger(lua, 1);
66
int b = luaL_checkinteger(lua, 2);
77
pinMode(a, b);
8+
return 0;
89
}
910

1011
static int lua_wrapper_digitalWrite(lua_State *lua) {
1112
int a = luaL_checkinteger(lua, 1);
1213
int b = luaL_checkinteger(lua, 2);
1314
digitalWrite(a, b);
15+
return 0;
1416
}
1517

1618
static int lua_wrapper_delay(lua_State *lua) {
1719
int a = luaL_checkinteger(lua, 1);
1820
delay(a);
21+
return 0;
1922
}
2023

2124
static int lua_wrapper_print (lua_State *L) {

0 commit comments

Comments
 (0)