mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-23 19:29:18 +00:00
fix some warnings in Xcode8 build
This commit is contained in:
parent
5538376dc8
commit
1f211fb37b
@ -343,12 +343,6 @@ static void ErrorAlert(int error)
|
||||
{
|
||||
ErrorAlert(GetString(error));
|
||||
}
|
||||
|
||||
// Display warning alert
|
||||
static void WarningAlert(int warning)
|
||||
{
|
||||
WarningAlert(GetString(warning));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -387,26 +381,6 @@ static int palette_size(int mode)
|
||||
}
|
||||
}
|
||||
|
||||
// Return bytes per pixel for requested depth
|
||||
static inline int bytes_per_pixel(int depth)
|
||||
{
|
||||
int bpp;
|
||||
switch (depth) {
|
||||
case 8:
|
||||
bpp = 1;
|
||||
break;
|
||||
case 15: case 16:
|
||||
bpp = 2;
|
||||
break;
|
||||
case 24: case 32:
|
||||
bpp = 4;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
return bpp;
|
||||
}
|
||||
|
||||
// Map video_mode depth ID to numerical depth value
|
||||
static int mac_depth_of_video_depth(int video_depth)
|
||||
{
|
||||
@ -690,7 +664,7 @@ void driver_base::init()
|
||||
|
||||
// Check whether we can initialize the VOSF subsystem and it's profitable
|
||||
if (!video_vosf_init(monitor)) {
|
||||
WarningAlert(STR_VOSF_INIT_ERR);
|
||||
WarningAlert(GetString(STR_VOSF_INIT_ERR));
|
||||
use_vosf = false;
|
||||
}
|
||||
else if (!video_vosf_profitable()) {
|
||||
|
@ -799,9 +799,9 @@ static uint8 *fill_buffer(int stream_len)
|
||||
#ifdef USE_SDL_AUDIO
|
||||
void MixAudio_bincue(uint8 *stream, int stream_len)
|
||||
{
|
||||
uint8 *buf;
|
||||
if (audio_enabled && (player.audiostatus == CDROM_AUDIO_PLAY)) {
|
||||
if (buf = fill_buffer(stream_len))
|
||||
uint8 *buf = fill_buffer(stream_len);
|
||||
if (buf)
|
||||
SDL_MixAudio(stream, buf, stream_len, SDL_MIX_MAXVOLUME);
|
||||
}
|
||||
}
|
||||
|
@ -433,7 +433,9 @@ static struct {
|
||||
int last;
|
||||
int count;
|
||||
} g_message_descriptors = { NULL, 0, 0 };
|
||||
#ifdef USE_THREADS
|
||||
static pthread_mutex_t g_message_descriptors_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
#endif
|
||||
|
||||
// Add a user-defined marshaler
|
||||
static int rpc_message_add_callback(const rpc_message_descriptor_t *desc)
|
||||
|
@ -77,7 +77,7 @@ icmp_input(m, hlen)
|
||||
|
||||
DEBUG_CALL("icmp_input");
|
||||
DEBUG_ARG("m = %lx", (long )m);
|
||||
DEBUG_ARG("m_len = %d", m->m_len);
|
||||
DEBUG_ARG("m_len = %zu", m->m_len);
|
||||
|
||||
icmpstat.icps_received++;
|
||||
|
||||
@ -201,12 +201,12 @@ end_error:
|
||||
|
||||
#define ICMP_MAXDATALEN (IP_MSS-28)
|
||||
void
|
||||
icmp_error(msrc, type, code, minsize, message)
|
||||
struct mbuf *msrc;
|
||||
u_char type;
|
||||
u_char code;
|
||||
int minsize;
|
||||
char *message;
|
||||
icmp_error(
|
||||
struct mbuf *msrc,
|
||||
u_char type,
|
||||
u_char code,
|
||||
int minsize,
|
||||
char *message)
|
||||
{
|
||||
unsigned hlen, shlen, s_ip_len;
|
||||
register struct ip *ip;
|
||||
@ -215,7 +215,7 @@ icmp_error(msrc, type, code, minsize, message)
|
||||
|
||||
DEBUG_CALL("icmp_error");
|
||||
DEBUG_ARG("msrc = %lx", (long )msrc);
|
||||
DEBUG_ARG("msrc_len = %d", msrc->m_len);
|
||||
DEBUG_ARG("msrc_len = %zu", msrc->m_len);
|
||||
|
||||
if(type!=ICMP_UNREACH && type!=ICMP_TIMXCEED) goto end_error;
|
||||
|
||||
|
@ -72,7 +72,7 @@ ip_input(m)
|
||||
|
||||
DEBUG_CALL("ip_input");
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("m_len = %d", m->m_len);
|
||||
DEBUG_ARG("m_len = %zu", m->m_len);
|
||||
|
||||
ipstat.ips_total++;
|
||||
|
||||
|
@ -71,7 +71,7 @@ void sbappend(struct socket *so, struct mbuf *m)
|
||||
DEBUG_CALL("sbappend");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("m->m_len = %d", m->m_len);
|
||||
DEBUG_ARG("m->m_len = %zu", m->m_len);
|
||||
|
||||
/* Shouldn't happen, but... e.g. foreign host closes connection */
|
||||
if (m->m_len <= 0) {
|
||||
|
@ -454,7 +454,7 @@ sorecvfrom(so)
|
||||
|
||||
m->m_len = recvfrom(so->s, m->m_data, len, 0,
|
||||
(struct sockaddr *)&addr, &addrlen);
|
||||
DEBUG_MISC((dfd, " did recvfrom %d, errno = %d-%s\n",
|
||||
DEBUG_MISC((dfd, " did recvfrom %zu, errno = %d-%s\n",
|
||||
m->m_len, errno,strerror(errno)));
|
||||
if(m->m_len<0) {
|
||||
u_char code=ICMP_UNREACH_PORT;
|
||||
|
@ -29,7 +29,7 @@
|
||||
}
|
||||
|
||||
-(NSString*)description {
|
||||
return [NSString stringWithFormat:@"DiskType, path:%@ isCDROM:%@", _path, _isCDROM];
|
||||
return [NSString stringWithFormat:@"DiskType, path:%@ isCDROM:%hhd", _path, _isCDROM];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -772,7 +772,7 @@ sigsegv_return_t sigsegv_handler(sigsegv_info_t *sip)
|
||||
const uint32 pc = cpu->pc();
|
||||
|
||||
// Fault in Mac ROM or RAM?
|
||||
bool mac_fault = (pc >= ROMBase) && (pc < (ROMBase + ROM_AREA_SIZE)) || (pc >= RAMBase) && (pc < (RAMBase + RAMSize)) || (pc >= DR_CACHE_BASE && pc < (DR_CACHE_BASE + DR_CACHE_SIZE));
|
||||
bool mac_fault = (pc >= ROMBase && pc < (ROMBase + ROM_AREA_SIZE)) || (pc >= RAMBase && pc < (RAMBase + RAMSize)) || (pc >= DR_CACHE_BASE && pc < (DR_CACHE_BASE + DR_CACHE_SIZE));
|
||||
if (mac_fault) {
|
||||
|
||||
// "VM settings" during MacOS 8 installation
|
||||
|
@ -664,23 +664,6 @@ static const uint8 adbop_patch[] = { // Call ADBOp() completion procedure
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Copy PowerPC code to ROM image and reverse bytes if necessary
|
||||
*/
|
||||
|
||||
static inline void memcpy_powerpc_code(void *dst, const void *src, size_t len)
|
||||
{
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
(void)memcpy(dst, src, len);
|
||||
#else
|
||||
uint32 *d = (uint32 *)dst;
|
||||
uint32 *s = (uint32 *)src;
|
||||
for (int i = 0; i < len/4; i++)
|
||||
d[i] = htonl(s[i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Install ROM patches (RAMBase and KernelDataAddr must be set)
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user