Skip to content

Commit

Permalink
Fix unused vars etc. in internal Lua files.
Browse files Browse the repository at this point in the history
Thanks to François Perrad.
  • Loading branch information
Mike Pall committed Jul 17, 2016
1 parent aef4edd commit 1914de7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/host/genminilua.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ local function merge_includes(src)
if includes[name] then return "" end
includes[name] = true
local fp = assert(io.open(LUA_SOURCE..name, "r"))
local src = fp:read("*a")
local inc = fp:read("*a")
assert(fp:close())
src = gsub(src, "#ifndef%s+%w+_h\n#define%s+%w+_h\n", "")
src = gsub(src, "#endif%s*$", "")
return merge_includes(src)
inc = gsub(inc, "#ifndef%s+%w+_h\n#define%s+%w+_h\n", "")
inc = gsub(inc, "#endif%s*$", "")
return merge_includes(inc)
end)
end

Expand Down
2 changes: 1 addition & 1 deletion src/jit/dis_arm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

local type = type
local sub, byte, format = string.sub, string.byte, string.format
local match, gmatch, gsub = string.match, string.gmatch, string.gsub
local match, gmatch = string.match, string.gmatch
local concat = table.concat
local bit = require("bit")
local band, bor, ror, tohex = bit.band, bit.bor, bit.ror, bit.tohex
Expand Down
4 changes: 2 additions & 2 deletions src/jit/dis_mips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
------------------------------------------------------------------------------

local type = type
local sub, byte, format = string.sub, string.byte, string.format
local match, gmatch, gsub = string.match, string.gmatch, string.gsub
local byte, format = string.byte, string.format
local match, gmatch = string.match, string.gmatch
local concat = table.concat
local bit = require("bit")
local band, bor, tohex = bit.band, bit.bor, bit.tohex
Expand Down
2 changes: 1 addition & 1 deletion src/jit/dis_ppc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
------------------------------------------------------------------------------

local type = type
local sub, byte, format = string.sub, string.byte, string.format
local byte, format = string.byte, string.format
local match, gmatch, gsub = string.match, string.gmatch, string.gsub
local concat = table.concat
local bit = require("bit")
Expand Down
6 changes: 3 additions & 3 deletions src/jit/dump.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ local traceinfo, traceir, tracek = jutil.traceinfo, jutil.traceir, jutil.tracek
local tracemc, tracesnap = jutil.tracemc, jutil.tracesnap
local traceexitstub, ircalladdr = jutil.traceexitstub, jutil.ircalladdr
local bit = require("bit")
local band, shl, shr = bit.band, bit.lshift, bit.rshift
local band, shr = bit.band, bit.rshift
local sub, gsub, format = string.sub, string.gsub, string.format
local byte, char, rep = string.byte, string.char, string.rep
local byte, rep = string.byte, string.rep
local type, tostring = type, tostring
local stdout, stderr = io.stdout, io.stderr

Expand Down Expand Up @@ -207,7 +207,7 @@ local colortype_ansi = {
"\027[35m%s\027[m",
}

local function colorize_text(s, t)
local function colorize_text(s)
return s
end

Expand Down

0 comments on commit 1914de7

Please sign in to comment.