summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2017-07-06 14:30:54 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2017-07-07 07:18:28 +0200
commit8f3dab4b63f48a0ebca5c40e054a0e8abc982866 (patch)
treed695a0b2752ed633f46b31e00c8428bb1f20c189 /lib/url.js
parent7d7ccf06316d5ba584613c8c0462f0e7e0fde9ec (diff)
downloadandroid-node-v8-8f3dab4b63f48a0ebca5c40e054a0e8abc982866.tar.gz
android-node-v8-8f3dab4b63f48a0ebca5c40e054a0e8abc982866.tar.bz2
android-node-v8-8f3dab4b63f48a0ebca5c40e054a0e8abc982866.zip
n-api: fix warning in test_general
Currently the following warning is issued when buildning: Building addon /work/nodejs/node/test/addons-napi/test_general/ CC(target) Debug/obj.target/test_general/test_general.o ../test_general.c:116:14: warning: variable 'result' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] } else if (argument_type == napi_null) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../test_general.c:119:10: note: uninitialized use occurs here return result; ^~~~~~ ../test_general.c:116:10: note: remove the 'if' if its condition is always true } else if (argument_type == napi_null) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../test_general.c:101:20: note: initialize the variable 'result' to silence this warning napi_value result; ^ = NULL This commit simply initializes result to NULL to avoid this warning. PR-URL: https://github.com/nodejs/node/pull/14104 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'lib/url.js')
0 files changed, 0 insertions, 0 deletions