@@ -32,15 +32,14 @@ function Stack:Create()
32
32
33
33
-- pop a value from the stack
34
34
function t :pop (num )
35
-
36
35
-- get num values from stack
37
- local num = num or 1
36
+ num = num or 1
38
37
39
38
-- return table
40
39
local entries = {}
41
40
42
41
-- get values into entries
43
- for i = 1 , num do
42
+ for _ = 1 , num do
44
43
-- get last entry
45
44
if # self ._et ~= 0 then
46
45
table.insert (entries , self ._et [# self ._et ])
@@ -83,7 +82,7 @@ local function popen3(path, ...)
83
82
84
83
assert ((r1 ~= nil or r2 ~= nil or r3 ~= nil ), " pipe() failed" )
85
84
86
- local pid , err = posix .fork ()
85
+ local pid , _ = posix .fork ()
87
86
assert (pid ~= nil , " fork() failed" )
88
87
if pid == 0 then
89
88
posix .close (w1 )
@@ -96,7 +95,7 @@ local function popen3(path, ...)
96
95
posix .close (w2 )
97
96
posix .close (w3 )
98
97
99
- local ret , err , errno = posix .execp (path , table.unpack ({... }))
98
+ local ret , _ , _ = posix .execp (path , table.unpack ({... }))
100
99
assert (ret ~= nil , " execp() failed" )
101
100
102
101
posix ._exit (1 )
@@ -171,7 +170,7 @@ local function pipe_simple(input, cmd, ...)
171
170
local read_stderr = coroutine.create (function () read_async (e , bufsize , timeout ) end )
172
171
while true do
173
172
if not stdout_ended then
174
- local cstatus , pstatus , ended , buf , pcode = coroutine.resume (read_stdout )
173
+ local _ , pstatus , ended , buf , _ = coroutine.resume (read_stdout )
175
174
if pstatus == 1 then
176
175
stdout_ended = ended
177
176
if not stdout_ended then
@@ -181,7 +180,7 @@ local function pipe_simple(input, cmd, ...)
181
180
end
182
181
183
182
if not stderr_ended then
184
- local cstatus , pstatus , ended , buf , pcode = coroutine.resume (read_stderr )
183
+ local _ , pstatus , ended , buf , _ = coroutine.resume (read_stderr )
185
184
if pstatus == 1 then
186
185
stderr_ended = ended
187
186
if not stderr_ended then
0 commit comments