diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-04-02 16:07:49 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-04-02 16:07:49 +0300 |
commit | 6241099db26d6451441887604be5e4ebc4e61885 (patch) | |
tree | 3043d099249c88658532dba088bd1531d9c0b8dd /src/nodejs | |
parent | 56101e47eebbb818718772c85a8ff3e689ef7bcd (diff) | |
download | unit-6241099db26d6451441887604be5e4ebc4e61885.tar.gz unit-6241099db26d6451441887604be5e4ebc4e61885.tar.bz2 |
Removing unused variables and assignments.
Warnings introduced in 53533ba0097c commit.
Diffstat (limited to '')
-rw-r--r-- | src/nodejs/unit-http/unit.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/nodejs/unit-http/unit.cpp b/src/nodejs/unit-http/unit.cpp index 6da890ce..ebde01ce 100644 --- a/src/nodejs/unit-http/unit.cpp +++ b/src/nodejs/unit-http/unit.cpp @@ -77,9 +77,7 @@ Unit::destroy(napi_env env, void *nativeObject, void *finalize_hint) napi_value Unit::create(napi_env env, napi_callback_info info) { - Unit *obj; nxt_napi napi(env); - napi_ref ref; napi_value target, cons, instance, jsthis; try { @@ -89,9 +87,8 @@ Unit::create(napi_env env, napi_callback_info info) /* Invoked as constructor: `new Unit(...)`. */ jsthis = napi.get_cb_info(info); - obj = new Unit(env, jsthis); - - ref = napi.create_reference(jsthis); + new Unit(env, jsthis); + napi.create_reference(jsthis); return jsthis; } @@ -99,7 +96,7 @@ Unit::create(napi_env env, napi_callback_info info) /* Invoked as plain function `Unit(...)`, turn into construct call. */ cons = napi.get_reference_value(constructor_); instance = napi.new_instance(cons); - ref = napi.create_reference(instance); + napi.create_reference(instance); } catch (exception &e) { napi.throw_error(e); @@ -166,13 +163,13 @@ Unit::_read(napi_env env, napi_callback_info info) void *data; size_t argc; nxt_napi napi(env); - napi_value jsthis, buffer, argv; + napi_value buffer, argv; nxt_unit_request_info_t *req; argc = 1; try { - jsthis = napi.get_cb_info(info, argc, &argv); + napi.get_cb_info(info, argc, &argv); req = napi.get_request_info(argv); buffer = napi.create_buffer((size_t) req->content_length, &data); |