Skip to content

Commit 72be1dc

Browse files
committed
stdlib: use "C" style casts in the overlay shims
When this header is used to create a module, it is used in a "C" environment, which means that we cannot use the C++ style casts. Switch to the old-style-cast. If we need to, we can always use `-Wno-old-style-casts` to silence the warnings in C++ mode.
1 parent 2bcdcdd commit 72be1dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/SwiftShims/LibcOverlayShims.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static inline int _swift_stdlib_ioctlPtr(int fd, unsigned long int request, void
9999
#if defined(_WIN32) && !defined(__CYGWIN__)
100100
// Windows
101101
static inline int _swift_stdlib_open(const char *path, int oflag, mode_t mode) {
102-
return _open(path, oflag, static_cast<int>(mode));
102+
return _open(path, oflag, (int)mode);
103103
}
104104

105105
#else

0 commit comments

Comments
 (0)