mirror of
https://github.com/captain-amygdala/pistorm.git
synced 2026-04-03 20:12:45 +00:00
Silence some compile warnings
This commit is contained in:
@@ -287,7 +287,7 @@ struct emulator_config *load_config_file(char *filename) {
|
||||
break;
|
||||
case CONFITEM_MAP: {
|
||||
unsigned int maptype = 0, mapsize = 0, mapaddr = 0;
|
||||
int mirraddr = -1;
|
||||
unsigned int mirraddr = ((unsigned int)-1);
|
||||
char mapfile[128], mapid[128];
|
||||
memset(mapfile, 0x00, 128);
|
||||
memset(mapid, 0x00, 128);
|
||||
|
||||
@@ -55,12 +55,12 @@ struct emulator_config {
|
||||
unsigned int cpu_type;
|
||||
|
||||
unsigned char map_type[MAX_NUM_MAPPED_ITEMS];
|
||||
long map_offset[MAX_NUM_MAPPED_ITEMS];
|
||||
long map_high[MAX_NUM_MAPPED_ITEMS];
|
||||
unsigned long map_offset[MAX_NUM_MAPPED_ITEMS];
|
||||
unsigned long map_high[MAX_NUM_MAPPED_ITEMS];
|
||||
unsigned int map_size[MAX_NUM_MAPPED_ITEMS];
|
||||
unsigned int rom_size[MAX_NUM_MAPPED_ITEMS];
|
||||
unsigned char *map_data[MAX_NUM_MAPPED_ITEMS];
|
||||
int map_mirror[MAX_NUM_MAPPED_ITEMS];
|
||||
unsigned int map_mirror[MAX_NUM_MAPPED_ITEMS];
|
||||
char *map_id[MAX_NUM_MAPPED_ITEMS];
|
||||
|
||||
struct platform_config *platform;
|
||||
|
||||
@@ -230,7 +230,7 @@ cpu_loop:
|
||||
}
|
||||
goto cpu_loop;
|
||||
|
||||
stop_cpu_emulation:
|
||||
//stop_cpu_emulation:
|
||||
printf("[CPU] End of CPU thread\n");
|
||||
}
|
||||
|
||||
@@ -332,6 +332,7 @@ key_loop:
|
||||
|
||||
key_end:
|
||||
printf("[KBD] Keyboard thread ending\n");
|
||||
return (void*)NULL;
|
||||
}
|
||||
|
||||
void stop_cpu_emulation(uint8_t disasm_cur) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#define NONE 0x80
|
||||
|
||||
static int lshift = 0, rshift = 0, lctrl = 0, rctrl = 0, lalt = 0, altgr = 0;
|
||||
static int lshift = 0, rshift = 0,/* lctrl = 0, rctrl = 0,*/ lalt = 0, altgr = 0;
|
||||
extern int mouse_fd;
|
||||
extern int keyboard_fd;
|
||||
|
||||
|
||||
@@ -220,6 +220,6 @@
|
||||
|
||||
/* ======================================================================== */
|
||||
/* ============================== END OF FILE ============================= */
|
||||
/* =======================================x================================= */
|
||||
/* ======================================================================== */
|
||||
|
||||
#endif /* M68KCONF__HEADER */
|
||||
|
||||
@@ -404,7 +404,7 @@ static char* make_signed_hex_str_32(uint val)
|
||||
/* make string of immediate value */
|
||||
static char* get_imm_str_s(uint size)
|
||||
{
|
||||
static char str[15];
|
||||
static char str[25];
|
||||
if(size == 0)
|
||||
sprintf(str, "#%s", make_signed_hex_str_8(read_imm_8()));
|
||||
else if(size == 1)
|
||||
@@ -416,7 +416,7 @@ static char* get_imm_str_s(uint size)
|
||||
|
||||
static char* get_imm_str_u(uint size)
|
||||
{
|
||||
static char str[15];
|
||||
static char str[25];
|
||||
if(size == 0)
|
||||
sprintf(str, "#$%x", read_imm_8() & 0xff);
|
||||
else if(size == 1)
|
||||
@@ -3773,7 +3773,7 @@ unsigned int m68k_disassemble(char* str_buff, unsigned int pc, unsigned int cpu_
|
||||
|
||||
char* m68ki_disassemble_quick(unsigned int pc, unsigned int cpu_type)
|
||||
{
|
||||
static char buff[100];
|
||||
static char buff[1000];
|
||||
buff[0] = 0;
|
||||
m68k_disassemble(buff, pc, cpu_type);
|
||||
return buff;
|
||||
|
||||
@@ -24,7 +24,7 @@ inline int handle_mapped_read(struct emulator_config *cfg, unsigned int addr, un
|
||||
if (cfg->map_type[i] == MAPTYPE_NONE)
|
||||
continue;
|
||||
else if (ovl && cfg->map_type[i] == MAPTYPE_ROM) {
|
||||
if (cfg->map_mirror[i] != -1 && CHKRANGE(addr, cfg->map_mirror[i], cfg->map_size[i])) {
|
||||
if (cfg->map_mirror[i] != ((unsigned int)-1) && CHKRANGE(addr, cfg->map_mirror[i], cfg->map_size[i])) {
|
||||
read_addr = cfg->map_data[i] + ((addr - cfg->map_mirror[i]) % cfg->rom_size[i]);
|
||||
goto read_value;
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ void writeGayleB(unsigned int address, unsigned int value) {
|
||||
goto idewrite8;
|
||||
case GIRQ_4000_OFFSET:
|
||||
gayle_a4k_irq = value;
|
||||
/* Fallthrough */
|
||||
case GIRQ_OFFSET:
|
||||
gayle_irq = (gayle_irq & value) | (value & (GAYLE_IRQ_RESET | GAYLE_IRQ_BERR));
|
||||
return;
|
||||
|
||||
@@ -476,7 +476,7 @@ void create_platform_amiga(struct platform_config *cfg, char *subsys) {
|
||||
if (subsys) {
|
||||
cfg->subsys = malloc(strlen(subsys) + 1);
|
||||
strcpy(cfg->subsys, subsys);
|
||||
for (int i = 0; i < strlen(cfg->subsys); i++) {
|
||||
for (unsigned int i = 0; i < strlen(cfg->subsys); i++) {
|
||||
cfg->subsys[i] = tolower(cfg->subsys[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
const uint8_t ide_magic[9] = {
|
||||
'1','D','E','D','1','5','C','0',0x00
|
||||
};
|
||||
|
||||
/*
|
||||
static char *charmap(uint8_t v)
|
||||
{
|
||||
static char cbuf[3];
|
||||
@@ -108,7 +108,7 @@ static void hexdump(uint8_t *bp)
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/* FIXME: use proper endian convertors! */
|
||||
static uint16_t le16(uint16_t v)
|
||||
{
|
||||
@@ -524,6 +524,7 @@ static uint16_t ide_data_in(struct ide_drive *d, int len)
|
||||
|
||||
static void ide_data_out(struct ide_drive *d, uint16_t v, int len)
|
||||
{
|
||||
(void)len;
|
||||
if (d->state != IDE_DATA_OUT) {
|
||||
ide_fault(d, "bad data write");
|
||||
d->taskfile.data = v;
|
||||
@@ -624,6 +625,8 @@ uint8_t ide_read8(struct ide_controller *c, uint8_t r)
|
||||
return c->lba4 | ((c->selected) ? 0x10 : 0x00);
|
||||
case ide_status_r:
|
||||
d->intrq = 0; /* Acked */
|
||||
/* Fallthrough */
|
||||
/* no break */
|
||||
case ide_altst_r:
|
||||
return t->status;
|
||||
default:
|
||||
@@ -649,7 +652,7 @@ void ide_write8(struct ide_controller *c, uint8_t r, uint8_t v)
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t ve;
|
||||
// uint8_t ve;
|
||||
|
||||
switch(r) {
|
||||
case ide_data:
|
||||
@@ -876,7 +879,11 @@ static void make_ascii(uint16_t *p, const char *t, int len)
|
||||
{
|
||||
int i;
|
||||
char *d = (char *)p;
|
||||
// strncpy(d, t, len);
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
strncpy(d, t, len);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
for (i = 0; i < len; i += 2) {
|
||||
char c = *d;
|
||||
|
||||
@@ -18,13 +18,14 @@ static const char *op_type_names[4] = {
|
||||
|
||||
void pinet_init(char *dev) {
|
||||
// Initialize them nets.
|
||||
(void)dev;
|
||||
}
|
||||
|
||||
uint8_t PI_MAC[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
uint8_t PI_IP[4] = { 192, 168, 1, 9 };
|
||||
|
||||
void handle_pinet_write(uint32_t addr, uint32_t val, uint8_t type) {
|
||||
int32_t r;
|
||||
// int32_t r;
|
||||
|
||||
switch (addr & 0xFFFF) {
|
||||
case PINET_CMD_READ:
|
||||
|
||||
@@ -281,7 +281,7 @@ void rtg_blittemplate(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint32_t s
|
||||
if (i != -1) {
|
||||
sptr = &cfg->map_data[i][src_addr - cfg->map_offset[i]];
|
||||
if (realtime_graphics_debug) {
|
||||
printf("Grabbing data from maping %d - offset %.8X\nData:\n", i, src_addr - cfg->map_offset[i]);
|
||||
printf("Grabbing data from maping %d - offset %.8lX\nData:\n", i, src_addr - cfg->map_offset[i]);
|
||||
for (int i = 0; i < h; i++) {
|
||||
for (int j = 0; j < t_pitch; j++) {
|
||||
printf("%.2X", sptr[j + (i * t_pitch)]);
|
||||
|
||||
@@ -28,11 +28,11 @@ uint32_t framebuffer_addr = 0;
|
||||
uint32_t framebuffer_addr_adj = 0;
|
||||
|
||||
static void handle_rtg_command(uint32_t cmd);
|
||||
static struct timespec f1, f2;
|
||||
//static struct timespec f1, f2;
|
||||
|
||||
uint8_t realtime_graphics_debug = 0;
|
||||
extern int cpu_emulation_running;
|
||||
|
||||
/*
|
||||
static const char *op_type_names[OP_TYPE_NUM] = {
|
||||
"BYTE",
|
||||
"WORD",
|
||||
@@ -46,7 +46,7 @@ static const char *rtg_format_names[RTGFMT_NUM] = {
|
||||
"32BPP RGB (RGBA)",
|
||||
"15BPP RGB (555)",
|
||||
};
|
||||
|
||||
*/
|
||||
int init_rtg_data() {
|
||||
rtg_mem = calloc(1, 40 * SIZE_MEGA);
|
||||
if (!rtg_mem) {
|
||||
@@ -57,8 +57,8 @@ int init_rtg_data() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern uint8_t busy, rtg_on;
|
||||
void rtg_update_screen();
|
||||
//extern uint8_t busy, rtg_on;
|
||||
//void rtg_update_screen();
|
||||
|
||||
unsigned int rtg_read(uint32_t address, uint8_t mode) {
|
||||
//printf("%s read from RTG: %.8X\n", op_type_names[mode], address);
|
||||
|
||||
Reference in New Issue
Block a user