Skip to content

Commit

Permalink
luacheck tuned and warnings fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
xHasKx committed Oct 27, 2021
1 parent ab2872a commit e84885e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ max_line_length = 200
files["mqtt/**"] = {
ignore = {
"113/unpack",
"212/.+_", -- unused argument value_
}
}

Expand Down
2 changes: 1 addition & 1 deletion mqtt/ngxsocket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local ngxsocket = {}

-- load required stuff
local string_sub = string.sub
local ngx_socket_tcp = ngx.socket.tcp
local ngx_socket_tcp = ngx.socket.tcp -- luacheck: ignore

-- Open network connection to .host and .port in conn table
-- Store opened socket to conn table
Expand Down
2 changes: 1 addition & 1 deletion mqtt/protocol5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ end
-- Returns packet on success or false and error message on failure
function protocol5.parse_packet(read_func)
assert(type(read_func) == "function", "expecting read_func to be a function")
local byte1, byte2, err, len, data, rc, ok, packet, topic, packet_id
-- parse fixed header
local byte1, byte2, err, len, data, rc, ok, packet, topic, packet_id, rc
byte1, err = read_func(1)
if not byte1 then
return false, "failed to read first byte: "..err
Expand Down

0 comments on commit e84885e

Please sign in to comment.