Skip to content

Commit

Permalink
src: avoid init order compiler warning
Browse files Browse the repository at this point in the history
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: nodejs#85
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
danbev authored and jasnell committed Jul 14, 2017
1 parent 10b57ba commit 78fdec8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 78fdec8

Please sign in to comment.