mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
Avoid implicit conversion. (#566)
Motivation: We were inadvertently doing an implicit integer conversion from ssize_t to unsigned int in our sendmmsg shim. This can sometimes generate warnings. The conversion itself is safe. Modifications: Make the conversion explicit. Result: No warnings.
This commit is contained in:
1 parent
8078cc8e04
commit
131f378d95
1 file changed
+1
-1
@@ -39,7 +39,7 @@ int CNIODarwin_sendmmsg(int sockfd, CNIODarwin_mmsghdr *msgvec, unsigned int vle
|
||||
}
|
||||
|
||||
// Send succeeded, save off the bytes written.
|
||||
msgvec[i].msg_len = sendAmount;
|
||||
msgvec[i].msg_len = (unsigned int)sendAmount;
|
||||
}
|
||||
|
||||
// If we dropped out, we sent everything.
|
||||
|
||||
Reference in new issue
Block a user