Fix Analyzer warnings.

In Xcode, type Command-Shift-B to analyze every source file or Command-Shift-Control-B to analyze the current source file.

For pseudo_dma_read report FIFO underrun and init data_word in that case.
This commit is contained in:
joevt 2023-08-15 15:25:36 -07:00 committed by dingusdev
parent e3411670cb
commit fd961f9ff9
5 changed files with 13 additions and 7 deletions

View File

@ -185,6 +185,10 @@ uint16_t Sc53C94::pseudo_dma_read()
} }
} }
} }
else {
LOG_F(ERROR, "SC53C94: FIFO underrun %d", data_fifo_pos);
data_word = 0;
}
// see if we need to refill FIFO // see if we need to refill FIFO
if (!this->data_fifo_pos && !is_done) { if (!this->data_fifo_pos && !is_done) {

View File

@ -28,7 +28,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <machines/machineproperties.h> #include <machines/machineproperties.h>
#include <memaccess.h> #include <memaccess.h>
#include <cinttypes>
#include <cstring> #include <cstring>
using namespace std; using namespace std;
@ -239,7 +238,7 @@ static char Apple_Copyright_Page_Data[] = "APPLE COMPUTER, INC ";
void ScsiCdrom::mode_sense() void ScsiCdrom::mode_sense()
{ {
uint8_t page_code = this->cmd_buf[2] & 0x3F; uint8_t page_code = this->cmd_buf[2] & 0x3F;
uint8_t alloc_len = this->cmd_buf[4]; //uint8_t alloc_len = this->cmd_buf[4];
int num_blocks = this->size_blocks; int num_blocks = this->size_blocks;

View File

@ -82,7 +82,8 @@ void AwacsBase::dma_out_start() {
if (!this->out_stream_running) { if (!this->out_stream_running) {
if ((err = snd_server->start_out_stream())) { if ((err = snd_server->start_out_stream())) {
LOG_F(ERROR, "%s: could not start sound output stream", this->name.c_str()); LOG_F(ERROR, "%s: could not start sound output stream: %d",
this->name.c_str(), err);
} }
} }
} }

View File

@ -62,7 +62,9 @@ uint32_t BurgundyCodec::snd_ctrl_read(uint32_t offset, int size) {
} }
void BurgundyCodec::snd_ctrl_write(uint32_t offset, uint32_t value, int size) { void BurgundyCodec::snd_ctrl_write(uint32_t offset, uint32_t value, int size) {
uint8_t reg_addr, cur_byte, last_byte; uint8_t reg_addr;
uint8_t cur_byte;
//uint8_t last_byte;
value = BYTESWAP_32(value); value = BYTESWAP_32(value);
@ -71,7 +73,7 @@ void BurgundyCodec::snd_ctrl_write(uint32_t offset, uint32_t value, int size) {
this->last_ctrl_data = value; this->last_ctrl_data = value;
reg_addr = (value >> 12) & 0xFF; reg_addr = (value >> 12) & 0xFF;
cur_byte = (value >> 8) & 3; cur_byte = (value >> 8) & 3;
last_byte = (value >> 10) & 3; //last_byte = (value >> 10) & 3;
if (value & BURGUNDY_REG_WR) { if (value & BURGUNDY_REG_WR) {
uint32_t mask = 0xFFU << (cur_byte * 8); uint32_t mask = 0xFFU << (cur_byte * 8);
this->reg_array[reg_addr] = (this->reg_array[reg_addr] & ~mask) | this->reg_array[reg_addr] = (this->reg_array[reg_addr] & ~mask) |

View File

@ -342,7 +342,7 @@ int MachineFactory::load_boot_rom(string& rom_filepath) {
size_t file_size; size_t file_size;
int result = 0; int result = 0;
uint32_t rom_load_addr; uint32_t rom_load_addr;
AddressMapEntry *rom_reg; //AddressMapEntry *rom_reg;
rom_file.open(rom_filepath, ios::in | ios::binary); rom_file.open(rom_filepath, ios::in | ios::binary);
if (rom_file.fail()) { if (rom_file.fail()) {
@ -373,7 +373,7 @@ int MachineFactory::load_boot_rom(string& rom_filepath) {
MemCtrlBase* mem_ctrl = dynamic_cast<MemCtrlBase*>( MemCtrlBase* mem_ctrl = dynamic_cast<MemCtrlBase*>(
gMachineObj->get_comp_by_type(HWCompType::MEM_CTRL)); gMachineObj->get_comp_by_type(HWCompType::MEM_CTRL));
if ((rom_reg = mem_ctrl->find_rom_region())) { if ((/*rom_reg = */mem_ctrl->find_rom_region())) {
mem_ctrl->set_data(rom_load_addr, sysrom_mem, (uint32_t)file_size); mem_ctrl->set_data(rom_load_addr, sysrom_mem, (uint32_t)file_size);
} else { } else {
LOG_F(ERROR, "Could not locate physical ROM region!"); LOG_F(ERROR, "Could not locate physical ROM region!");