Fix bug #49827: wrong cast to size_t on 16-bit x86 architecture

I hope I caught all of them.
TODO: Same for casts to get rid of alignment warnings, these are also casts via size_t
This commit is contained in:
Dirk Ziegelmeier
2016-12-12 10:07:00 +01:00
parent 7a1b38db6e
commit f2a5aa2866
6 changed files with 11 additions and 6 deletions

View File

@@ -1279,7 +1279,7 @@ lwip_writev(int s, const struct iovec *iov, int iovcnt)
msg.msg_namelen = 0;
/* Hack: we have to cast via number to cast from 'const' pointer to non-const.
Blame the opengroup standard for this inconsistency. */
msg.msg_iov = (struct iovec *)(size_t)iov;
msg.msg_iov = LWIP_CONST_CAST(struct iovec *, iov);
msg.msg_iovlen = iovcnt;
msg.msg_control = NULL;
msg.msg_controllen = 0;