From 8137668c531935c58347cd8e78147d3a9d3cc339 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Sun, 17 Feb 2019 10:53:47 +0800 Subject: src: apply clang-tidy rule modernize-deprecated-headers PR-URL: https://github.com/nodejs/node/pull/26159 Reviewed-By: Daniel Bevenius Reviewed-By: James M Snell --- src/api/exceptions.cc | 2 +- src/api/utils.cc | 2 +- src/async_wrap.h | 2 +- src/base64.h | 4 ++-- src/cares_wrap.cc | 4 ++-- src/debug_utils.cc | 2 +- src/env-inl.h | 4 ++-- src/env.cc | 2 +- src/env.h | 2 +- src/inspector_agent.cc | 4 ++-- src/inspector_agent.h | 2 +- src/inspector_io.cc | 2 +- src/inspector_io.h | 2 +- src/inspector_socket.cc | 2 +- src/module_wrap.cc | 2 +- src/node.cc | 12 ++++++------ src/node.h | 4 ++-- src/node_buffer.cc | 4 ++-- src/node_constants.cc | 4 ++-- src/node_crypto.cc | 6 +++--- src/node_crypto_bio.cc | 4 ++-- src/node_crypto_clienthello.h | 4 ++-- src/node_dtrace.cc | 2 +- src/node_errors.cc | 4 ++-- src/node_file.cc | 6 +++--- src/node_http2.h | 2 +- src/node_http_parser_impl.h | 4 ++-- src/node_internals.h | 4 ++-- src/node_main.cc | 2 +- src/node_options.cc | 2 +- src/node_os.cc | 6 +++--- src/node_process_events.cc | 2 +- src/node_process_methods.cc | 4 ++-- src/node_process_object.cc | 2 +- src/node_report.cc | 6 +++--- src/node_report.h | 4 ++-- src/node_stat_watcher.cc | 4 ++-- src/node_url.cc | 2 +- src/node_zlib.cc | 6 +++--- src/process_wrap.cc | 4 ++-- src/spawn_sync.cc | 2 +- src/stream_base.cc | 2 +- src/stream_wrap.cc | 4 ++-- src/string_bytes.cc | 4 ++-- src/string_search.h | 2 +- src/tcp_wrap.cc | 2 +- src/timers.cc | 2 +- src/tracing/node_trace_writer.cc | 2 +- src/tracing/traced_value.cc | 2 +- src/tracing/traced_value.h | 2 +- src/util.cc | 2 +- src/util.h | 12 ++++++------ 52 files changed, 90 insertions(+), 90 deletions(-) (limited to 'src') diff --git a/src/api/exceptions.cc b/src/api/exceptions.cc index 4d1cca8b65..897a4de365 100644 --- a/src/api/exceptions.cc +++ b/src/api/exceptions.cc @@ -7,7 +7,7 @@ #include "uv.h" #include "v8.h" -#include +#include namespace node { diff --git a/src/api/utils.cc b/src/api/utils.cc index e6993f33b0..b0998b6fb7 100644 --- a/src/api/utils.cc +++ b/src/api/utils.cc @@ -1,7 +1,7 @@ #include "node.h" #include "node_internals.h" -#include +#include namespace node { diff --git a/src/async_wrap.h b/src/async_wrap.h index 6d5da4e4ee..09319c11bb 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -27,7 +27,7 @@ #include "base_object.h" #include "v8.h" -#include +#include namespace node { diff --git a/src/base64.h b/src/base64.h index aedec375eb..ba60970431 100644 --- a/src/base64.h +++ b/src/base64.h @@ -5,8 +5,8 @@ #include "util.h" -#include -#include +#include +#include namespace node { //// Base 64 //// diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 91226ebdf7..dadba4be7b 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -28,8 +28,8 @@ #include "util-inl.h" #include "uv.h" -#include -#include +#include +#include #include #include diff --git a/src/debug_utils.cc b/src/debug_utils.cc index fadcaa5061..f1024183cd 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -19,7 +19,7 @@ #include #include #include -#include +#include #endif #else // __POSIX__ diff --git a/src/env-inl.h b/src/env-inl.h index 63b71daf15..9752613b29 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -34,8 +34,8 @@ #include "node_context_data.h" #include "node_worker.h" -#include -#include +#include +#include #include diff --git a/src/env.cc b/src/env.cc index fce949f63a..3f30fda374 100644 --- a/src/env.cc +++ b/src/env.cc @@ -14,7 +14,7 @@ #include "tracing/traced_value.h" #include "v8-profiler.h" -#include +#include #include #include diff --git a/src/env.h b/src/env.h index 3856f5241d..bd8ff76129 100644 --- a/src/env.h +++ b/src/env.h @@ -38,7 +38,7 @@ #include "uv.h" #include "v8.h" -#include +#include #include #include #include diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 15edf7f00c..82d96e7ef7 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -16,13 +16,13 @@ #include "libplatform/libplatform.h" -#include +#include #include #include #include #ifdef __POSIX__ -#include // PTHREAD_STACK_MIN +#include // PTHREAD_STACK_MIN #include #endif // __POSIX__ diff --git a/src/inspector_agent.h b/src/inspector_agent.h index 905b1e2841..b8b03b2edc 100644 --- a/src/inspector_agent.h +++ b/src/inspector_agent.h @@ -5,7 +5,7 @@ #include -#include +#include #if !HAVE_INSPECTOR #error("This header can only be used when inspector is enabled") diff --git a/src/inspector_io.cc b/src/inspector_io.cc index 42643fa6f6..161ba276dd 100644 --- a/src/inspector_io.cc +++ b/src/inspector_io.cc @@ -13,7 +13,7 @@ #include "zlib.h" #include -#include +#include #include namespace node { diff --git a/src/inspector_io.h b/src/inspector_io.h index bc09afdd3d..e4b4ee44f8 100644 --- a/src/inspector_io.h +++ b/src/inspector_io.h @@ -8,7 +8,7 @@ #include "uv.h" #include -#include +#include #if !HAVE_INSPECTOR #error("This header can only be used when inspector is enabled") diff --git a/src/inspector_socket.cc b/src/inspector_socket.cc index 7be9a01e0c..fd10231af7 100644 --- a/src/inspector_socket.cc +++ b/src/inspector_socket.cc @@ -11,7 +11,7 @@ #include "openssl/sha.h" // Sha-1 hash #include -#include +#include #define ACCEPT_KEY_LENGTH base64_encoded_size(20) #define BUFFER_GROWTH_CHUNK_SIZE 1024 diff --git a/src/module_wrap.cc b/src/module_wrap.cc index 93e791b522..3d55d12cc3 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -1,5 +1,5 @@ #include -#include // PATH_MAX +#include // PATH_MAX #include // S_IFDIR #include "module_wrap.h" diff --git a/src/node.cc b/src/node.cc index b3195b7365..e46232405f 100644 --- a/src/node.cc +++ b/src/node.cc @@ -72,13 +72,13 @@ #include "large_pages/node_large_page.h" #endif -#include +#include #include // _O_RDWR -#include // PATH_MAX -#include -#include -#include -#include +#include // PATH_MAX +#include +#include +#include +#include #include #include diff --git a/src/node.h b/src/node.h index 53fb5fb51a..3ba5cf92f3 100644 --- a/src/node.h +++ b/src/node.h @@ -178,8 +178,8 @@ NODE_DEPRECATED("Use MakeCallback(..., async_context)", } // namespace node -#include -#include +#include +#include #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index aca1842c30..10b8f4098f 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -31,8 +31,8 @@ #include "v8-profiler.h" #include "v8.h" -#include -#include +#include +#include #define THROW_AND_RETURN_UNLESS_BUFFER(env, obj) \ THROW_AND_RETURN_IF_NOT_BUFFER(env, obj, "argument") \ diff --git a/src/node_constants.cc b/src/node_constants.cc index debcf0e100..e4eae1727c 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -24,12 +24,12 @@ #include "zlib.h" -#include +#include #if !defined(_MSC_VER) #include #endif #include -#include +#include #include #include #include diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 49b9dfe576..dcdecb5064 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -37,9 +37,9 @@ #include "util-inl.h" #include "v8.h" -#include -#include // INT_MAX -#include +#include +#include // INT_MAX +#include #include #include diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc index baa90204f2..31165b7c98 100644 --- a/src/node_crypto_bio.cc +++ b/src/node_crypto_bio.cc @@ -22,8 +22,8 @@ #include "node_crypto_bio.h" #include "openssl/bio.h" #include "util-inl.h" -#include -#include +#include +#include namespace node { namespace crypto { diff --git a/src/node_crypto_clienthello.h b/src/node_crypto_clienthello.h index 48f49771fd..d1661735f5 100644 --- a/src/node_crypto_clienthello.h +++ b/src/node_crypto_clienthello.h @@ -24,8 +24,8 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#include // size_t -#include +#include // size_t +#include namespace node { namespace crypto { diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 0f33f59b33..59d1f9d143 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -44,7 +44,7 @@ #include "node_errors.h" -#include +#include namespace node { diff --git a/src/node_errors.cc b/src/node_errors.cc index a17012b5b3..17394c863c 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "node_errors.h" #include "node_internals.h" diff --git a/src/node_file.cc b/src/node_file.cc index 960fd052e8..96e0ba7e04 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -36,9 +36,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #if defined(__MINGW32__) || defined(_MSC_VER) # include diff --git a/src/node_http2.h b/src/node_http2.h index aa953667fa..9065718c60 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -4,7 +4,7 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS // FIXME(joyeecheung): nghttp2.h needs stdint.h to compile on Windows -#include +#include #include "nghttp2/nghttp2.h" #include "node_http2_state.h" diff --git a/src/node_http_parser_impl.h b/src/node_http_parser_impl.h index 16c0e77ae8..ae780d5371 100644 --- a/src/node_http_parser_impl.h +++ b/src/node_http_parser_impl.h @@ -35,8 +35,8 @@ #include "util-inl.h" #include "v8.h" -#include // free() -#include // strdup(), strchr() +#include // free() +#include // strdup(), strchr() #include "http_parser_adaptor.h" diff --git a/src/node_internals.h b/src/node_internals.h index 82cf5713e9..166cfd9ea2 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -34,8 +34,8 @@ #include "uv.h" #include "v8.h" -#include -#include +#include +#include #include #include diff --git a/src/node_main.cc b/src/node_main.cc index 7107aea8c1..e92c0df942 100644 --- a/src/node_main.cc +++ b/src/node_main.cc @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. #include "node.h" -#include +#include #ifdef _WIN32 #include diff --git a/src/node_options.cc b/src/node_options.cc index bdd39d5d71..0d932200a9 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -1,4 +1,4 @@ -#include +#include #include "env-inl.h" #include "node_binding.h" #include "node_options-inl.h" diff --git a/src/node_os.cc b/src/node_os.cc index 1d3680a632..cbf2a30409 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -24,15 +24,15 @@ #include "util.h" #include -#include -#include +#include +#include #ifdef __MINGW32__ # include #endif // __MINGW32__ #ifdef __POSIX__ -# include // PATH_MAX on Solaris. +# include // PATH_MAX on Solaris. # include // gethostname, sysconf #endif // __POSIX__ diff --git a/src/node_process_events.cc b/src/node_process_events.cc index ccc40b6575..440e67d412 100644 --- a/src/node_process_events.cc +++ b/src/node_process_events.cc @@ -1,4 +1,4 @@ -#include +#include #include "env-inl.h" #include "node_process.h" diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index ca8a435805..b46735bc79 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -15,8 +15,8 @@ #include "inspector_io.h" #endif -#include // PATH_MAX -#include +#include // PATH_MAX +#include #if defined(_MSC_VER) #include diff --git a/src/node_process_object.cc b/src/node_process_object.cc index 2f47b21f69..cbec233c27 100644 --- a/src/node_process_object.cc +++ b/src/node_process_object.cc @@ -1,4 +1,4 @@ -#include // PATH_MAX +#include // PATH_MAX #include "env-inl.h" #include "node_internals.h" diff --git a/src/node_report.cc b/src/node_report.cc index 8ca35cabb9..a379f0621f 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -27,12 +27,12 @@ #endif #include #include -#include +#include #endif #include -#include -#include +#include +#include #include #ifndef _MSC_VER diff --git a/src/node_report.h b/src/node_report.h index c83c52eb39..2aa55151d8 100644 --- a/src/node_report.h +++ b/src/node_report.h @@ -14,8 +14,8 @@ #include #include "v8.h" -#include -#include +#include +#include #include #include #include diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index 9564a0a2b3..f673c4085e 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -25,8 +25,8 @@ #include "node_file.h" #include "util.h" -#include -#include +#include +#include namespace node { diff --git a/src/node_url.cc b/src/node_url.cc index d7402c4d04..2070b713ac 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -6,7 +6,7 @@ #include #include -#include +#include #include namespace node { diff --git a/src/node_zlib.cc b/src/node_zlib.cc index 639d7f87c5..badac08449 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -32,9 +32,9 @@ #include "brotli/decode.h" #include "zlib.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 37afaf8ff9..583851cdbb 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -24,8 +24,8 @@ #include "stream_wrap.h" #include "util-inl.h" -#include -#include +#include +#include namespace node { diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc index 749e628fbd..6e5c3360cd 100644 --- a/src/spawn_sync.cc +++ b/src/spawn_sync.cc @@ -25,7 +25,7 @@ #include "node_internals.h" #include "string_bytes.h" -#include +#include namespace node { diff --git a/src/stream_base.cc b/src/stream_base.cc index ebd9beb984..24210e1e26 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -10,7 +10,7 @@ #include "util-inl.h" #include "v8.h" -#include // INT_MAX +#include // INT_MAX namespace node { diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index d126f90eef..3247a604b4 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -31,8 +31,8 @@ #include "udp_wrap.h" #include "util-inl.h" -#include // memcpy() -#include // INT_MAX +#include // memcpy() +#include // INT_MAX namespace node { diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 53bb95d80d..041868cb1e 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -27,8 +27,8 @@ #include "node_errors.h" #include "util.h" -#include -#include // memcpy +#include +#include // memcpy #include #include diff --git a/src/string_search.h b/src/string_search.h index 95c746ea89..3968c8c869 100644 --- a/src/string_search.h +++ b/src/string_search.h @@ -9,7 +9,7 @@ #include "util.h" -#include +#include #include namespace node { diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index cb6e634006..43c6ea5958 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -31,7 +31,7 @@ #include "stream_wrap.h" #include "util-inl.h" -#include +#include namespace node { diff --git a/src/timers.cc b/src/timers.cc index f80e9e6be4..b11df62be2 100644 --- a/src/timers.cc +++ b/src/timers.cc @@ -2,7 +2,7 @@ #include "util.h" #include "v8.h" -#include +#include namespace node { namespace { diff --git a/src/tracing/node_trace_writer.cc b/src/tracing/node_trace_writer.cc index b93688cc95..3b07504acc 100644 --- a/src/tracing/node_trace_writer.cc +++ b/src/tracing/node_trace_writer.cc @@ -1,6 +1,6 @@ #include "tracing/node_trace_writer.h" -#include +#include #include #include "util-inl.h" diff --git a/src/tracing/traced_value.cc b/src/tracing/traced_value.cc index b2a1badad1..3eb21a11c9 100644 --- a/src/tracing/traced_value.cc +++ b/src/tracing/traced_value.cc @@ -6,7 +6,7 @@ #include #include -#include +#include #include #if defined(NODE_HAVE_I18N_SUPPORT) diff --git a/src/tracing/traced_value.h b/src/tracing/traced_value.h index 7507978408..955d62dfe6 100644 --- a/src/tracing/traced_value.h +++ b/src/tracing/traced_value.h @@ -9,7 +9,7 @@ #include "util.h" #include "v8.h" -#include +#include #include #include diff --git a/src/util.cc b/src/util.cc index 81070c239d..3cdc222a96 100644 --- a/src/util.cc +++ b/src/util.cc @@ -19,7 +19,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -#include +#include #include #include "node_buffer.h" #include "node_errors.h" diff --git a/src/util.h b/src/util.h index 312f91e68e..4cd04dc6af 100644 --- a/src/util.h +++ b/src/util.h @@ -27,12 +27,12 @@ #include "node_persistent.h" #include "v8.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include // std::function #include -- cgit v1.2.3