Skip to content

Commit d05808d

Browse files
committed
synchronized with lua-nginx-module #33a5517 (fixed clang warnings).
Upstream patch from agentzh.
1 parent 3018ec8 commit d05808d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/subsys/ngx_subsys_lua_semaphore.c.tt2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ ngx_[% subsys %]_lua_alloc_sema(void)
8888
lmcf = ngx_[% subsys %]_cycle_get_module_main_conf(ngx_cycle,
8989
ngx_[% subsys %]_lua_module);
9090

91+
ngx_[% subsys %]_lua_assert(lmcf != NULL);
92+
9193
mm = lmcf->sema_mm;
9294

9395
if (!ngx_queue_empty(&mm->free_queue)) {
@@ -174,6 +176,8 @@ ngx_[% subsys %]_lua_sema_mm_cleanup(void *data)
174176
sem = ngx_queue_data(q, ngx_[% subsys %]_lua_sema_t, chain);
175177
block = sem->block;
176178

179+
ngx_[% subsys %]_lua_assert(block != NULL);
180+
177181
if (block->used == 0) {
178182
iter = (ngx_[% subsys %]_lua_sema_t *) (block + 1);
179183

src/subsys/ngx_subsys_lua_util.c.tt2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ ngx_[% subsys %]_lua_new_state(lua_State *parent_vm, ngx_cycle_t *cycle,
277277

278278
lua_pushliteral(L, LUA_DEFAULT_PATH ";"); /* package default */
279279
lua_getfield(L, -2, "path"); /* package default old */
280-
old_path = lua_tolstring(L, -1, &old_path_len);
281280
lua_concat(L, 2); /* package new */
282281
lua_setfield(L, -2, "path"); /* package */
283282
#endif

0 commit comments

Comments
 (0)