Author: jkim
Date: Thu Feb 18 19:37:39 2016
New Revision: 295767
URL: https://svnweb.freebsd.org/changeset/base/295767

Log:
  Silence VPS-Studio errors (V512).  These buffer underflows are intentional.

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==============================================================================
--- head/sys/compat/x86bios/x86bios.c   Thu Feb 18 19:05:30 2016        
(r295766)
+++ head/sys/compat/x86bios/x86bios.c   Thu Feb 18 19:37:39 2016        
(r295767)
@@ -586,7 +586,7 @@ x86bios_call(struct x86regs *regs, uint1
                X86BIOS_TRACE(Calling 0x%06x, (seg << 4) + off, regs);
 
        mtx_lock(&x86bios_lock);
-       memcpy(&x86bios_emu.x86, regs, sizeof(*regs));
+       memcpy((struct x86regs *)&x86bios_emu.x86, regs, sizeof(*regs));
        x86bios_fault = 0;
        spinlock_enter();
        x86emu_exec_call(&x86bios_emu, seg, off);
@@ -628,7 +628,7 @@ x86bios_intr(struct x86regs *regs, int i
                X86BIOS_TRACE(Calling INT 0x%02x, intno, regs);
 
        mtx_lock(&x86bios_lock);
-       memcpy(&x86bios_emu.x86, regs, sizeof(*regs));
+       memcpy((struct x86regs *)&x86bios_emu.x86, regs, sizeof(*regs));
        x86bios_fault = 0;
        spinlock_enter();
        x86emu_exec_intr(&x86bios_emu, intno);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to