From 64740d44b5b1414ee1ab2fa313e9fab6def3ebf4 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 23 Sep 2019 08:21:47 +0200 Subject: [PATCH] src: fix compiler warning in inspector_profiler.cc Currently, the following compiler warnings is generated: ../src/inspector_profiler.cc:231:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] profile->Set(context, FIXED_ONE_BYTE_STRING(isolate, "source-map-cache") ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. This commit adds a .ToChecked() call to avoid the warning. PR-URL: https://github.com/nodejs/node/pull/29660 Reviewed-By: David Carlier Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Minwoo Jung Reviewed-By: James M Snell --- src/inspector_profiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inspector_profiler.cc b/src/inspector_profiler.cc index 1444a36bdf95a5..b5f63b2b41389d 100644 --- a/src/inspector_profiler.cc +++ b/src/inspector_profiler.cc @@ -229,7 +229,7 @@ void V8CoverageConnection::WriteProfile(Local message) { // Avoid writing to disk if no source-map data: if (!source_map_cache_v->IsUndefined()) { profile->Set(context, FIXED_ONE_BYTE_STRING(isolate, "source-map-cache"), - source_map_cache_v); + source_map_cache_v).ToChecked(); } Local result_s;