Skip to content

Commit e84885e

Browse files
committed
luacheck tuned and warnings fixed
1 parent ab2872a commit e84885e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.luacheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ max_line_length = 200
1111
files["mqtt/**"] = {
1212
ignore = {
1313
"113/unpack",
14+
"212/.+_", -- unused argument value_
1415
}
1516
}
1617

mqtt/ngxsocket.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ local ngxsocket = {}
44

55
-- load required stuff
66
local string_sub = string.sub
7-
local ngx_socket_tcp = ngx.socket.tcp
7+
local ngx_socket_tcp = ngx.socket.tcp -- luacheck: ignore
88

99
-- Open network connection to .host and .port in conn table
1010
-- Store opened socket to conn table

mqtt/protocol5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,8 @@ end
806806
-- Returns packet on success or false and error message on failure
807807
function protocol5.parse_packet(read_func)
808808
assert(type(read_func) == "function", "expecting read_func to be a function")
809+
local byte1, byte2, err, len, data, rc, ok, packet, topic, packet_id
809810
-- parse fixed header
810-
local byte1, byte2, err, len, data, rc, ok, packet, topic, packet_id, rc
811811
byte1, err = read_func(1)
812812
if not byte1 then
813813
return false, "failed to read first byte: "..err

0 commit comments

Comments
 (0)