Fix a warning that has been annoying me for some time:

"kern/sys_generic.c:358: warning: cast discards qualifiers from pointer
   target type"
The idea for using the uintptr_t intermediate cast for de-constifying
a pointer was hinted at by bde some time ago.
This commit is contained in:
Peter Wemm 2000-07-28 22:17:42 +00:00
parent bb663856f8
commit b31ae1adc5

View File

@ -355,7 +355,7 @@ dofilewrite(p, fp, fd, buf, nbyte, offset, flags)
int didktr = 0;
#endif
aiov.iov_base = (void *)buf;
aiov.iov_base = (void *)(uintptr_t)buf;
aiov.iov_len = nbyte;
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;