Skip to content

Commit

Permalink
src: guard exit label when inspector disabled
Browse files Browse the repository at this point in the history
Currently, when configured --without-inspector the following warning
will be generated:
../src/node.cc:859:1: warning: unused label 'exit' [-Wunused-label]
exit:

This commit adds a guard to exclude the label when there is no
inspector support.

PR-URL: #26801
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
  • Loading branch information
danbev authored and targos committed Mar 27, 2019
1 parent 54753f2 commit 220f67c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,9 @@ inline int StartNodeWithIsolate(Isolate* isolate,

WaitForInspectorDisconnect(&env);

#if HAVE_INSPECTOR && NODE_USE_V8_PLATFORM
exit:
#endif
env.set_can_call_into_js(false);
env.stop_sub_worker_contexts();
uv_tty_reset_mode();
Expand Down

0 comments on commit 220f67c

Please sign in to comment.