Fixed some MSVC warnings
This commit is contained in:
parent
4d4d194c16
commit
b8d6862dfa
@ -588,7 +588,7 @@ Bit16u bx_voodoo_c::get_retrace(void)
|
||||
if (time_in_frame > BX_VOODOO_THIS s.vdraw.vsync_usec) {
|
||||
return 0;
|
||||
} else {
|
||||
return (BX_VOODOO_THIS s.vdraw.vsync_usec - time_in_frame) / BX_VOODOO_THIS s.vdraw.htotal_usec;
|
||||
return (Bit16u)((BX_VOODOO_THIS s.vdraw.vsync_usec - time_in_frame) / BX_VOODOO_THIS s.vdraw.htotal_usec + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002-2013 The Bochs Project
|
||||
// Copyright (C) 2002-2014 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -1113,7 +1113,7 @@ void bx_floppy_ctrl_c::floppy_xfer(Bit8u drive, Bit32u offset, Bit8u *buffer,
|
||||
|
||||
if (direction == FROM_FLOPPY) {
|
||||
if (BX_FD_THIS s.media[drive].vvfat_floppy) {
|
||||
ret = BX_FD_THIS s.media[drive].vvfat->read(buffer, bytes);
|
||||
ret = (int)BX_FD_THIS s.media[drive].vvfat->read(buffer, bytes);
|
||||
#if BX_WITH_MACOS
|
||||
} else if (!strcmp(SIM->get_param_string(pname)->getptr(), SuperDrive))
|
||||
ret = fd_read((char *) buffer, offset, bytes);
|
||||
@ -1134,7 +1134,7 @@ void bx_floppy_ctrl_c::floppy_xfer(Bit8u drive, Bit32u offset, Bit8u *buffer,
|
||||
} else { // TO_FLOPPY
|
||||
BX_ASSERT (!BX_FD_THIS s.media[drive].write_protected);
|
||||
if (BX_FD_THIS s.media[drive].vvfat_floppy) {
|
||||
ret = BX_FD_THIS s.media[drive].vvfat->write(buffer, bytes);
|
||||
ret = (int)BX_FD_THIS s.media[drive].vvfat->write(buffer, bytes);
|
||||
#if BX_WITH_MACOS
|
||||
} else if (!strcmp(SIM->get_param_string(pname)->getptr(), SuperDrive))
|
||||
ret = fd_write((char *) buffer, offset, bytes);
|
||||
|
@ -676,7 +676,7 @@ ssize_t concat_image_t::read(void* buf, size_t count)
|
||||
if ((Bit64s)(total_offset + count - 1) <= thismax) {
|
||||
return ::read(fd, buf1, count);
|
||||
} else {
|
||||
count1 = thismax - total_offset + 1;
|
||||
count1 = (size_t)(thismax - total_offset + 1);
|
||||
ret = ::read(fd, buf1, count1);
|
||||
if (ret >= 0) {
|
||||
buf1 += count1;
|
||||
@ -704,7 +704,7 @@ ssize_t concat_image_t::write(const void* buf, size_t count)
|
||||
if ((Bit64s)(total_offset + count - 1) <= thismax) {
|
||||
return ::write(fd, buf1, count);
|
||||
} else {
|
||||
count1 = thismax - total_offset + 1;
|
||||
count1 = (size_t)(thismax - total_offset + 1);
|
||||
ret = ::write(fd, buf1, count1);
|
||||
if (ret >= 0) {
|
||||
buf1 += count1;
|
||||
@ -1048,7 +1048,7 @@ ssize_t sparse_image_t::read(void* buf, size_t count)
|
||||
|
||||
BX_ASSERT (can_read != 0);
|
||||
|
||||
size_t was_read = read_page_fragment(position_virtual_page, position_page_offset, can_read, buf);
|
||||
size_t was_read = (size_t)read_page_fragment(position_virtual_page, position_page_offset, can_read, buf);
|
||||
|
||||
if (was_read != can_read) {
|
||||
BX_PANIC(("could not read from sparse disk"));
|
||||
|
@ -254,7 +254,7 @@ void scsi_device_t::scsi_read_data(Bit32u tag)
|
||||
BX_ERROR(("could not lseek() hard drive image file"));
|
||||
scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_HARDWARE_ERROR);
|
||||
}
|
||||
ret = hdimage->read((bx_ptr_t)r->dma_buf, r->buf_len);
|
||||
ret = (int)hdimage->read((bx_ptr_t)r->dma_buf, r->buf_len);
|
||||
if (ret < r->buf_len) {
|
||||
BX_ERROR(("could not read() hard drive image file"));
|
||||
scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_HARDWARE_ERROR);
|
||||
@ -310,7 +310,7 @@ int scsi_device_t::scsi_write_data(Bit32u tag)
|
||||
BX_ERROR(("could not lseek() hard drive image file"));
|
||||
scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_HARDWARE_ERROR);
|
||||
}
|
||||
ret = hdimage->write((bx_ptr_t)r->dma_buf, r->buf_len);
|
||||
ret = (int)hdimage->write((bx_ptr_t)r->dma_buf, r->buf_len);
|
||||
r->sector += n;
|
||||
r->sector_count -= n;
|
||||
if (ret < r->buf_len) {
|
||||
|
Loading…
Reference in New Issue
Block a user