1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

kvm_write: fix -Wcast-qual warning in pointer arithmetic argument

Cast buf to `const char *` when doing arithmetic operation to match
`cp`'s type [1].

Differential Revision:	D10082
MFC after:	1 week
Reviewed by:	cem (earlier diff), vangyzen
Submitted by:	cem [1]
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Enji Cooper 2017-03-21 20:48:36 +00:00
parent 279e2af5d1
commit 0f5425a4fc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315688

View File

@ -476,7 +476,7 @@ kvm_write(kvm_t *kd, u_long kva, const void *buf, size_t len)
len -= cw;
}
return (cp - (char *)buf);
return (cp - (const char *)buf);
}
int