Skip to content

Commit dbed73d

Browse files
author
Tor Didriksen
committed
Bug #34114909 Fix compiler warnings from clang on Windows [noclose]
The patch for WL#15130 Socket-level TLS patch mysql#1: class NdbSocket re-introduced a -Wcast-qual warning. Use const_cast, and reinterpret_cast to fix it, since the corresponding posix version of ndb_socket_writev() is const-correct. Change-Id: Ib446a926b4108edf51eda7d8fd27ada560b67a24
1 parent 6ba26df commit dbed73d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

storage/ndb/include/portlib/ndb_socket_win32.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ static inline
125125
ssize_t ndb_socket_writev(ndb_socket_t s, const struct iovec *iov, int iovcnt)
126126
{
127127
DWORD rv=0;
128-
if (WSASend(s.s,(LPWSABUF)iov,iovcnt,&rv,0,0,0) == SOCKET_ERROR)
128+
if (WSASend(s.s,
129+
reinterpret_cast<LPWSABUF>(const_cast<struct iovec *>(iov)),
130+
iovcnt, &rv, 0, 0, 0) == SOCKET_ERROR)
129131
return -1;
130132
return rv;
131133
}

0 commit comments

Comments
 (0)