From 78fdec8278f1b53b8d383bd3b54f4935c464a182 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 5 May 2017 13:01:24 +0200 Subject: [PATCH] src: avoid init order compiler warning Currently when compiling the following error is displayed: In file included from /out/Release/obj/gen/node_javascript.cc:6: ../src/env-inl.h:201:7: warning: field 'fs_stats_field_array_' will be initialized after field 'http2_socket_buffer_' [-Wreorder] fs_stats_field_array_(nullptr), ^ In file included from /out/Debug/obj/gen/node_javascript.cc:6: ../src/env-inl.h:201:7: warning: field 'fs_stats_field_array_' will be initialized after field 'http2_socket_buffer_' [-Wreorder] fs_stats_field_array_(nullptr), ^ 1 warning generated. This commit changes the order so that the members appear in the same order in the initializer list. PR-URL: https://github.com/nodejs/http2/pull/85 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- src/env-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/env-inl.h b/src/env-inl.h index bac15d37c5..aa66ff428c 100755 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -304,8 +304,8 @@ inline Environment::Environment(IsolateData* isolate_data, #endif handle_cleanup_waiting_(0), http_parser_buffer_(nullptr), - fs_stats_field_array_(nullptr), http2_socket_buffer_(nullptr), + fs_stats_field_array_(nullptr), context_(context->GetIsolate(), context) { // We'll be creating new objects so make sure we've entered the context. v8::HandleScope handle_scope(isolate());