Fix some warnings when building Xcode project.

This commit is contained in:
Alexei Svitkine 2015-06-29 11:50:50 -04:00
parent 339c421787
commit d3cb3ca95f
4 changed files with 17 additions and 7 deletions

View File

@ -645,7 +645,6 @@ driver_base::driver_base(SDL_monitor_desc &m)
void driver_base::set_video_mode(int flags)
{
int aligned_height = (VIDEO_MODE_Y + 15) & ~15;
int depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH);
if ((s = SDL_SetVideoMode(VIDEO_MODE_X, VIDEO_MODE_Y, depth,
SDL_HWSURFACE | flags)) == NULL)

View File

@ -330,6 +330,7 @@ int rpc_wait_dispatch(rpc_connection_t *connection, int timeout)
return _rpc_wait_dispatch(connection, timeout);
}
#ifdef USE_THREADS
// Process incoming messages in the background
static void *rpc_server_func(void *arg)
{
@ -356,6 +357,7 @@ static void *rpc_server_func(void *arg)
connection->server_thread_active = 0;
return NULL;
}
#endif
// Return listen socket of RPC connection
int rpc_listen_socket(rpc_connection_t *connection)

View File

@ -30,6 +30,15 @@
#include <unistd.h>
// NSInteger was added in 10.5 SDK.
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
#if __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
#else
typedef int NSInteger;
#endif
#endif
const int CDROMRefNum = -62; // RefNum of driver
#ifdef STANDALONE_PREFS
@ -62,12 +71,12 @@ void prefs_exit()
return self;
}
- (int) numberOfRowsInTableView: (NSTableView *) table
- (NSInteger) numberOfRowsInTableView: (NSTableView *) table
{
return [diskArray count];
}
- (id) tableView: (NSTableView *) table objectValueForTableColumn: (NSTableColumn *) col row: (int) row
- (id) tableView: (NSTableView *) table objectValueForTableColumn: (NSTableColumn *) col row: (NSInteger) row
{
DiskType *d = (DiskType*)[diskArray objectAtIndex:row];
@ -78,7 +87,7 @@ void prefs_exit()
return [d path];
}
-(void)tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
- (void) tableView: (NSTableView *) table setObjectValue: (id) object forTableColumn: (NSTableColumn *) tableColumn row: (NSInteger) row
{
if ([[tableColumn identifier] isEqual:@"isCDROMcol"]) {
DiskType *d = (DiskType*)[diskArray objectAtIndex:row];

View File

@ -339,7 +339,7 @@ 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);
if (find_desc(tm))
printf("WARNING: InsTime(%08lx): Task re-inserted\n", tm);
printf("WARNING: InsTime(%08x): Task re-inserted\n", tm);
else {
TMDesc *desc = new TMDesc;
desc->task = tm;
@ -361,7 +361,7 @@ int16 RmvTime(uint32 tm)
// Find descriptor
TMDesc *desc = find_desc(tm);
if (!desc) {
printf("WARNING: RmvTime(%08lx): Descriptor not found\n", tm);
printf("WARNING: RmvTime(%08x): Descriptor not found\n", tm);
return 0;
}
@ -436,7 +436,7 @@ int16 PrimeTime(uint32 tm, int32 time)
// Find descriptor
TMDesc *desc = find_desc(tm);
if (!desc) {
printf("FATAL: PrimeTime(%08lx): Descriptor not found\n", tm);
printf("FATAL: PrimeTime(%08x): Descriptor not found\n", tm);
return 0;
}