Skip to content

Commit 6ab3de8

Browse files
sunjayBhatiawrowe
andcommitted
Fix clang-tidy errors
- typedef instead of using in platform.h - exclude win32 completely Signed-off-by: Sunjay Bhatia <[email protected]> Co-authored-by: Sunjay Bhatia <[email protected]> Signed-off-by: William A Rowe Jr <[email protected]> Co-authored-by: William A Rowe Jr <[email protected]>
1 parent 476337b commit 6ab3de8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ci/run_clang_tidy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ trap cleanup EXIT
3737
# TODO(scw00): We should run clang-tidy against win32 impl. But currently we only have
3838
# linux ci box.
3939
function exclude_win32_impl() {
40-
grep -v source/common/filesystem/win32/ | grep -v source/common/common/win32 | grep -v source/exe/win32
40+
grep -v source/common/filesystem/win32/ | grep -v source/common/common/win32 | grep -v source/exe/win32 | grep -v source/common/api/win32
4141
}
4242

4343
# Do not run incremental clang-tidy on check_format testdata files.

include/envoy/common/platform.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@
5353
__pragma(pack(push, 1)) definition, ##__VA_ARGS__; \
5454
__pragma(pack(pop))
5555

56-
using ssize_t = ptrdiff_t;
56+
typedef ptrdiff_t ssize_t;
5757

5858
// This is needed so the OsSysCalls interface compiles on Windows,
5959
// shmOpen takes mode_t as an argument.
60-
using mode_t = uint32_t;
60+
typedef uint32_t mode_t;
6161

62-
using os_fd_t = SOCKET;
62+
typedef SOCKET os_fd_t;
6363

6464
typedef unsigned int sa_family_t;
6565

@@ -188,7 +188,7 @@ struct msghdr {
188188
#define IP6T_SO_ORIGINAL_DST 80
189189
#endif
190190

191-
using os_fd_t = int;
191+
typedef int os_fd_t;
192192

193193
#define INVALID_SOCKET -1
194194
#define SOCKET_VALID(sock) ((sock) >= 0)

0 commit comments

Comments
 (0)