From 2ea84d86c741999426d044a90abc0fecfbae58eb Mon Sep 17 00:00:00 2001 From: asvitkine Date: Mon, 4 Apr 2022 13:53:53 -0400 Subject: [PATCH] Fix some compile warnings with Xcode project build. --- BasiliskII/src/Unix/serial_unix.cpp | 8 ++++---- BasiliskII/src/sony.cpp | 4 ++-- SheepShaver/src/MacOSX/prefs_macosx.mm | 2 +- SheepShaver/src/timer.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/BasiliskII/src/Unix/serial_unix.cpp b/BasiliskII/src/Unix/serial_unix.cpp index 81922b43..0f28ec7c 100644 --- a/BasiliskII/src/Unix/serial_unix.cpp +++ b/BasiliskII/src/Unix/serial_unix.cpp @@ -648,16 +648,16 @@ bool XSERDPort::configure(uint16 config) // Set number of data bits switch (config & 0x0c00) { case data5: - mode.c_cflag = mode.c_cflag & ~CSIZE | CS5; + mode.c_cflag = (mode.c_cflag & ~CSIZE) | CS5; break; case data6: - mode.c_cflag = mode.c_cflag & ~CSIZE | CS6; + mode.c_cflag = (mode.c_cflag & ~CSIZE) | CS6; break; case data7: - mode.c_cflag = mode.c_cflag & ~CSIZE | CS7; + mode.c_cflag = (mode.c_cflag & ~CSIZE) | CS7; break; case data8: - mode.c_cflag = mode.c_cflag & ~CSIZE | CS8; + mode.c_cflag = (mode.c_cflag & ~CSIZE) | CS8; break; } diff --git a/BasiliskII/src/sony.cpp b/BasiliskII/src/sony.cpp index 804239b7..46289007 100644 --- a/BasiliskII/src/sony.cpp +++ b/BasiliskII/src/sony.cpp @@ -263,7 +263,7 @@ int16 SonyOpen(uint32 pb, uint32 dce) // Set up DCE WriteMacInt32(dce + dCtlPosition, 0); - WriteMacInt16(dce + dCtlQHdr + qFlags, ReadMacInt16(dce + dCtlQHdr + qFlags) & 0xff00 | 3); // Version number, must be >=3 or System 8 will replace us + WriteMacInt16(dce + dCtlQHdr + qFlags, (ReadMacInt16(dce + dCtlQHdr + qFlags) & 0xff00) | 3); // Version number, must be >=3 or System 8 will replace us acc_run_called = false; // Install driver again with refnum -2 (HD20) @@ -520,7 +520,7 @@ int16 SonyStatus(uint32 pb, uint32 dce) break; case 10: // Get disk type and MFM info - WriteMacInt32(pb + csParam, ReadMacInt32(info->status + dsMFMDrive) & 0xffffff00 | 0xfe); // 0xfe = SWIM2 controller + WriteMacInt32(pb + csParam, (ReadMacInt32(info->status + dsMFMDrive) & 0xffffff00) | 0xfe); // 0xfe = SWIM2 controller break; // case 0x4350: // Measure disk speed at a given track ('CP') (not supported) diff --git a/SheepShaver/src/MacOSX/prefs_macosx.mm b/SheepShaver/src/MacOSX/prefs_macosx.mm index 4f91cdbb..63be01af 100644 --- a/SheepShaver/src/MacOSX/prefs_macosx.mm +++ b/SheepShaver/src/MacOSX/prefs_macosx.mm @@ -52,7 +52,7 @@ return nil; } - NSLog(@"%d objects loaded\n", [objects count]); + NSLog(@"%lu objects loaded\n", [objects count]); // Release the raw nib data. [nib release]; diff --git a/SheepShaver/src/timer.cpp b/SheepShaver/src/timer.cpp index f8a52ecc..ca733340 100644 --- a/SheepShaver/src/timer.cpp +++ b/SheepShaver/src/timer.cpp @@ -337,7 +337,7 @@ void TimerReset(void) int16 InsTime(uint32 tm, uint16 trap) { D(bug("InsTime %08lx, trap %04x\n", tm, trap)); - WriteMacInt16((uint32)tm + qType, ReadMacInt16((uint32)tm + qType) & 0x1fff | (trap << 4) & 0x6000); + WriteMacInt16((uint32)tm + qType, (ReadMacInt16((uint32)tm + qType) & 0x1fff) | ((trap << 4) & 0x6000)); if (find_desc(tm)) printf("WARNING: InsTime(%08x): Task re-inserted\n", tm); else {