Author: ngie
Date: Tue Mar 21 20:48:36 2017
New Revision: 315688
URL: https://svnweb.freebsd.org/changeset/base/315688

Log:
  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

Modified:
  head/lib/libkvm/kvm.c

Modified: head/lib/libkvm/kvm.c
==============================================================================
--- head/lib/libkvm/kvm.c       Tue Mar 21 19:10:07 2017        (r315687)
+++ head/lib/libkvm/kvm.c       Tue Mar 21 20:48:36 2017        (r315688)
@@ -476,7 +476,7 @@ kvm_write(kvm_t *kd, u_long kva, const v
                len -= cw;
        }
 
-       return (cp - (char *)buf);
+       return (cp - (const char *)buf);
 }
 
 int
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to