Skip to content

Commit

Permalink
clang-tidy: modernize-deprecated-headers (envoyproxy#7626)
Browse files Browse the repository at this point in the history
Description: Use headers such as `<cstring>` as opposed to `<string.h>`. These headers were marked deprecated in C++11/14 - https://clang.llvm.org/extra/clang-tidy/checks/modernize-deprecated-headers.html
Risk Level: Low
Testing: existing
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Derek Argueta <dereka@pinterest.com>
  • Loading branch information
derekargueta authored and lizan committed Jul 18, 2019
1 parent aa24d08 commit 9f65941
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 21 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ WarningsAsErrors: 'abseil-duration-*,
bugprone-assert-side-effect,
bugprone-unused-raii,
bugprone-use-after-move,
modernize-deprecated-headers,
modernize-make-shared,
modernize-make-unique,
modernize-return-braced-init-list,
Expand Down
3 changes: 1 addition & 2 deletions source/common/network/io_socket_handle_impl.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "common/network/io_socket_handle_impl.h"

#include <errno.h>

#include <cerrno>
#include <iostream>

#include "envoy/buffer/buffer.h"
Expand Down
3 changes: 1 addition & 2 deletions source/common/router/config_utility.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include <inttypes.h>

#include <cinttypes>
#include <regex>
#include <string>
#include <vector>
Expand Down
3 changes: 1 addition & 2 deletions source/common/router/header_parser.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "common/router/header_parser.h"

#include <ctype.h>

#include <cctype>
#include <memory>
#include <string>

Expand Down
2 changes: 1 addition & 1 deletion source/common/signal/signal_action.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include <signal.h>
#include <unistd.h>

#include <algorithm>
#include <csignal>
#include <list>

#include "common/common/non_copyable.h"
Expand Down
3 changes: 1 addition & 2 deletions source/common/stats/isolated_store_impl.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "common/stats/isolated_store_impl.h"

#include <string.h>

#include <algorithm>
#include <cstring>
#include <string>

#include "common/common/utility.h"
Expand Down
3 changes: 1 addition & 2 deletions source/common/stats/isolated_store_impl.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#pragma once

#include <string.h>

#include <algorithm>
#include <cstring>
#include <string>

#include "envoy/stats/stats.h"
Expand Down
3 changes: 1 addition & 2 deletions source/common/stats/tag_extractor_impl.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "common/stats/tag_extractor_impl.h"

#include <string.h>

#include <cstring>
#include <string>

#include "envoy/common/exception.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "extensions/filters/listener/proxy_protocol/proxy_protocol.h"

#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>

#include <algorithm>
#include <cstdint>
#include <cstring>
#include <memory>
#include <string>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "extensions/filters/network/dubbo_proxy/conn_manager.h"

#include <stdint.h>
#include <cstdint>

#include "envoy/common/exception.h"

Expand Down
3 changes: 1 addition & 2 deletions source/extensions/filters/network/thrift_proxy/metadata.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#pragma once

#include <string.h>

#include <algorithm>
#include <cstring>
#include <list>
#include <memory>
#include <string>
Expand Down
3 changes: 1 addition & 2 deletions source/server/server.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "server/server.h"

#include <signal.h>

#include <atomic>
#include <csignal>
#include <cstdint>
#include <functional>
#include <memory>
Expand Down
3 changes: 2 additions & 1 deletion test/common/signal/signals_test.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <signal.h>
#include <sys/mman.h>

#include <csignal>

#include "common/signal/signal_action.h"

#include "test/test_common/utility.h"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/tcp_dump.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "test/integration/tcp_dump.h"

#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>

#include <csignal>
#include <fstream>

#include "common/common/assert.h"
Expand Down

0 comments on commit 9f65941

Please sign in to comment.