From 05d24b1455b3376ac536066178b400b65f05fff1 Mon Sep 17 00:00:00 2001 From: cebix <> Date: Tue, 5 Oct 1999 14:59:46 +0000 Subject: [PATCH] - fixed some compiler warnings - video_x.cpp: now checks whether the X server has the XFree86DGA extension --- BasiliskII/src/Unix/video_x.cpp | 12 ++++++++---- BasiliskII/src/emul_op.cpp | 3 +-- BasiliskII/src/macos_util.cpp | 2 +- BasiliskII/src/rom_patches.cpp | 1 - BasiliskII/src/slot_rom.cpp | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/BasiliskII/src/Unix/video_x.cpp b/BasiliskII/src/Unix/video_x.cpp index ade3c622..54d99712 100644 --- a/BasiliskII/src/Unix/video_x.cpp +++ b/BasiliskII/src/Unix/video_x.cpp @@ -142,7 +142,7 @@ extern void SysMountFirstFloppy(void); // Set VideoMonitor according to video mode void set_video_monitor(int width, int height, int bytes_per_row, bool native_byte_order) { - int layout; + int layout = FLAYOUT_DIRECT; switch (depth) { case 1: layout = FLAYOUT_DIRECT; @@ -470,9 +470,13 @@ bool VideoInit(bool classic) #if ENABLE_DGA // DGA available? - int dga_flags = 0; - XF86DGAQueryDirectVideo(x_display, screen, &dga_flags); - has_dga = dga_flags & XF86DGADirectPresent; + int event_base, error_base; + if (XF86DGAQueryExtension(x_display, &event_base, &error_base)) { + int dga_flags = 0; + XF86DGAQueryDirectVideo(x_display, screen, &dga_flags); + has_dga = dga_flags & XF86DGADirectPresent; + } else + has_dga = false; #endif // Find black and white colors diff --git a/BasiliskII/src/emul_op.cpp b/BasiliskII/src/emul_op.cpp index 526fdcaf..52b60292 100644 --- a/BasiliskII/src/emul_op.cpp +++ b/BasiliskII/src/emul_op.cpp @@ -152,9 +152,8 @@ void EmulOp(uint16 opcode, M68kRegisters *r) } } else if (reg < 0x08 && is_read) { uint32 t = TimerDateTime(); - uint8 b; + uint8 b = t; switch (reg & 3) { - case 0: b = t; break; case 1: b = t >> 8; break; case 2: b = t >> 16; break; case 3: b = t >> 24; break; diff --git a/BasiliskII/src/macos_util.cpp b/BasiliskII/src/macos_util.cpp index b002dc4c..d2707a1b 100644 --- a/BasiliskII/src/macos_util.cpp +++ b/BasiliskII/src/macos_util.cpp @@ -56,7 +56,7 @@ static bool is_drive_number_free(int num) uint32 e = ReadMacInt32(0x308 + qHead); while (e) { uint32 d = e - dsQLink; - if (ReadMacInt16(d + dsQDrive) == num) + if ((int)ReadMacInt16(d + dsQDrive) == num) return false; e = ReadMacInt32(e + qLink); } diff --git a/BasiliskII/src/rom_patches.cpp b/BasiliskII/src/rom_patches.cpp index 8c09ca67..ef44c1fe 100644 --- a/BasiliskII/src/rom_patches.cpp +++ b/BasiliskII/src/rom_patches.cpp @@ -837,7 +837,6 @@ static bool patch_rom_classic(void) // ROM patches for 32-bit clean Mac-II ROMs (version $067c) static bool patch_rom_32(void) { - uint32 *lp; uint16 *wp; uint8 *bp; uint32 base; diff --git a/BasiliskII/src/slot_rom.cpp b/BasiliskII/src/slot_rom.cpp index 4d747f96..1e2c11a3 100644 --- a/BasiliskII/src/slot_rom.cpp +++ b/BasiliskII/src/slot_rom.cpp @@ -392,7 +392,7 @@ bool InstallSlotROM(void) // Calculate CRC uint32 crc = 0; - for (int i=0; i
> 31); crc += srom[i]; }