diff --git a/src/disk.c b/src/disk.c index d0f94dbe..7edbeebb 100644 --- a/src/disk.c +++ b/src/disk.c @@ -134,7 +134,6 @@ static char zlibmenu[ZLIB_SUBMENU_H][ZLIB_SUBMENU_W+1] = ------------------------------------------------------------------------- */ void c_eject_6(int drive) { - int ch = -1; if (disk6.disk[drive].compressed) { @@ -146,7 +145,7 @@ void c_eject_6(int drive) { #ifdef INTERFACE_CLASSIC snprintf(&zlibmenu[4][2], 37, "%s", err); c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H); - while ((ch = c_mygetch(1)) == -1) { + while ((int ch = c_mygetch(1)) == -1) { // ... } #endif @@ -174,7 +173,6 @@ void c_eject_6(int drive) { ------------------------------------------------------------------------- */ int c_new_diskette_6(int drive, const char * const raw_file_name, int force) { struct stat buf; - int ch = -1; /* uncompress the gziped disk */ char *file_name = strdup(raw_file_name); @@ -194,7 +192,7 @@ int c_new_diskette_6(int drive, const char * const raw_file_name, int force) { #ifdef INTERFACE_CLASSIC snprintf(&zlibmenu[4][2], 37, "%s", err); c_interface_print_submenu_centered(zlibmenu[0], ZLIB_SUBMENU_W, ZLIB_SUBMENU_H); - while ((ch = c_mygetch(1)) == -1) { + while ((int ch = c_mygetch(1)) == -1) { // ... } #endif diff --git a/src/meta/debug.l b/src/meta/debug.l index f8acbe46..1a5179f3 100644 --- a/src/meta/debug.l +++ b/src/meta/debug.l @@ -113,8 +113,8 @@ ADDRS [0-9a-fA-F]+ do_ascii = 1; while (!isspace(*debugtext)) ++debugtext; - arg1 = strtol(debugtext, &debugtext, 16); - arg2 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); + arg2 = (int)strtol(debugtext, &debugtext, 16); dump_mem(arg1, arg2, 0, do_ascii, -1); return MEM; } @@ -127,11 +127,11 @@ ADDRS [0-9a-fA-F]+ do_ascii = 1; while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ - arg1 = strtol(debugtext, &debugtext, 16); - arg2 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); + arg2 = (int)strtol(debugtext, &debugtext, 16); dump_mem(arg1, arg2, 0, do_ascii, arg3); return MEM; } @@ -144,7 +144,7 @@ ADDRS [0-9a-fA-F]+ do_ascii = 1; while (!isspace(*debugtext)) ++debugtext; - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); dump_mem(arg1, 256, 0, do_ascii, -1); return MEM; } @@ -157,10 +157,10 @@ ADDRS [0-9a-fA-F]+ do_ascii = 1; while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); dump_mem(arg1, 256, 0, do_ascii, arg3); return MEM; } @@ -174,7 +174,7 @@ ADDRS [0-9a-fA-F]+ while (*debugtext != '+') ++debugtext; ++debugtext; - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); dump_mem(cpu65_current.pc, arg1, 0, do_ascii, -1); return MEM; } @@ -199,9 +199,9 @@ ADDRS [0-9a-fA-F]+ while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); - arg1 = strtol(debugtext, &debugtext, 16); - arg2 = strtol(debugtext, &debugtext, 16); + lc = (int)strtol(debugtext, &debugtext, 10); + arg1 = (int)strtol(debugtext, &debugtext, 16); + arg2 = (int)strtol(debugtext, &debugtext, 16); dump_mem(arg1, arg2, lc, do_ascii, -1); return MEM; @@ -216,14 +216,14 @@ ADDRS [0-9a-fA-F]+ do_ascii = 1; while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); + lc = (int)strtol(debugtext, &debugtext, 10); while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ - arg1 = strtol(debugtext, &debugtext, 16); - arg2 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); + arg2 = (int)strtol(debugtext, &debugtext, 16); dump_mem(arg1, arg2, lc, do_ascii, arg3); return MEM; @@ -239,8 +239,8 @@ ADDRS [0-9a-fA-F]+ while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); - arg1 = strtol(debugtext, &debugtext, 16); + lc = (int)strtol(debugtext, &debugtext, 10); + arg1 = (int)strtol(debugtext, &debugtext, 16); dump_mem(arg1, 256, lc, do_ascii, -1); return MEM; @@ -255,13 +255,13 @@ ADDRS [0-9a-fA-F]+ do_ascii = 1; while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); + lc = (int)strtol(debugtext, &debugtext, 10); while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); dump_mem(arg1, 256, lc, do_ascii, arg3); return MEM; @@ -271,8 +271,8 @@ ADDRS [0-9a-fA-F]+ /* disassemble at */ while (!isspace(*debugtext)) ++debugtext; - arg1 = strtol(debugtext, &debugtext, 16); - arg2 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); + arg2 = (int)strtol(debugtext, &debugtext, 16); disasm(arg1, arg2, 0, -1); return DIS; @@ -282,11 +282,11 @@ ADDRS [0-9a-fA-F]+ /* disassemble at // */ while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ - arg1 = strtol(debugtext, &debugtext, 16); - arg2 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); + arg2 = (int)strtol(debugtext, &debugtext, 16); disasm(arg1, arg2, 0, arg3); return DIS; @@ -296,7 +296,7 @@ ADDRS [0-9a-fA-F]+ /* disassemble at */ while (!isspace(*debugtext)) ++debugtext; - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); arg2 = 256; if ((arg1 < 0) || (arg1 > 65535)) arg1 = cpu65_current.pc; @@ -308,10 +308,10 @@ ADDRS [0-9a-fA-F]+ /* disassemble at // */ while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); arg2 = 256; if ((arg1 < 0) || (arg1 > 65535)) arg1 = cpu65_current.pc; @@ -324,7 +324,7 @@ ADDRS [0-9a-fA-F]+ while (*debugtext != '+') ++debugtext; ++debugtext; - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); disasm(cpu65_current.pc, arg1, 0, -1); return DIS; } @@ -342,9 +342,9 @@ ADDRS [0-9a-fA-F]+ while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); - arg1 = strtol(debugtext, &debugtext, 16); - arg2 = strtol(debugtext, &debugtext, 16); + lc = (int)strtol(debugtext, &debugtext, 10); + arg1 = (int)strtol(debugtext, &debugtext, 16); + arg2 = (int)strtol(debugtext, &debugtext, 16); disasm(arg1, arg2, lc, -1); return DIS; @@ -356,15 +356,15 @@ ADDRS [0-9a-fA-F]+ while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); + lc = (int)strtol(debugtext, &debugtext, 10); while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ - arg1 = strtol(debugtext, &debugtext, 16); - arg2 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); + arg2 = (int)strtol(debugtext, &debugtext, 16); disasm(arg1, arg2, lc, arg3); return DIS; @@ -377,8 +377,8 @@ ADDRS [0-9a-fA-F]+ while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); - arg1 = strtol(debugtext, &debugtext, 16); + lc = (int)strtol(debugtext, &debugtext, 10); + arg1 = (int)strtol(debugtext, &debugtext, 16); disasm(arg1, 256, lc, -1); return DIS; @@ -390,14 +390,14 @@ ADDRS [0-9a-fA-F]+ while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); + lc = (int)strtol(debugtext, &debugtext, 10); while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); disasm(arg1, 256, lc, arg3); return DIS; @@ -411,7 +411,7 @@ ADDRS [0-9a-fA-F]+ {BOS}{ADDRS}{WS}*\:{WS}*{HEX}+{EOS} { /* set memory : */ - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); while (*debugtext != ':') ++debugtext; ++debugtext; while (isspace(*debugtext)) ++debugtext; @@ -424,11 +424,11 @@ ADDRS [0-9a-fA-F]+ /* set LC memory lc1|lc2 : */ int lc; - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); + lc = (int)strtol(debugtext, &debugtext, 10); ++debugtext; while (isspace(*debugtext)) ++debugtext; set_lc_mem(arg1, lc, debugtext); @@ -445,7 +445,7 @@ ADDRS [0-9a-fA-F]+ while (isspace(*debugtext)) ++debugtext; ptr = debugtext; while (!isspace(*debugtext)) ++debugtext; - int len = MIN(debugtext-ptr, DEBUG_BUFSZ-1); + int len = MIN((int)(debugtext-ptr), DEBUG_BUFSZ-1); /* filename */ strncpy(buf, ptr, len); @@ -454,11 +454,11 @@ ADDRS [0-9a-fA-F]+ /* get bank info */ while (*debugtext != '/') ++debugtext; ++debugtext; - int bank = strtol(debugtext, &debugtext, 10); + int bank = (int)strtol(debugtext, &debugtext, 10); /* extract addrs */ ++debugtext; - arg1 = strtol(debugtext, (char**)NULL, 16); + arg1 = (int)strtol(debugtext, (char**)NULL, 16); fp = fopen(buf, "r"); if (fp == NULL) { @@ -491,7 +491,7 @@ ADDRS [0-9a-fA-F]+ while (!isspace(*debugtext)) ++debugtext; - arg1 = strtol(debugtext, (char**)NULL, 16); + arg1 = (int)strtol(debugtext, (char**)NULL, 16); if ((arg1 < 1) || (arg1 > 255)) arg1 = 255; stepping_struct_t s = { @@ -563,7 +563,7 @@ ADDRS [0-9a-fA-F]+ while (!isspace(*debugtext)) ++debugtext; /* DANGEROUS! */ - cpu65_current.pc = strtol(debugtext, (char**)NULL, 16); + cpu65_current.pc = (int)strtol(debugtext, (char**)NULL, 16); stepping_struct_t s = { .step_type = GOING @@ -592,7 +592,7 @@ ADDRS [0-9a-fA-F]+ /* set watchpoint */ while (!isspace(*debugtext)) ++debugtext; - arg1 = strtol(debugtext, (char**)NULL, 16); + arg1 = (int)strtol(debugtext, (char**)NULL, 16); if ((arg1 < 0) || (arg1 > 65535)) { sprintf(second_buf[num_buffer_lines++], "invalid address"); return WATCH; @@ -613,7 +613,7 @@ ADDRS [0-9a-fA-F]+ /* set breakpoint */ while (!isspace(*debugtext)) ++debugtext; - arg1 = strtol(debugtext, (char**)NULL, 16); + arg1 = (int)strtol(debugtext, (char**)NULL, 16); if ((arg1 < 0) || (arg1 > 65535)) { sprintf(second_buf[num_buffer_lines++], "invalid address"); return BREAK; @@ -628,7 +628,7 @@ ADDRS [0-9a-fA-F]+ while (!(*debugtext == 'p')) ++debugtext; ++debugtext; - arg1 = strtol(debugtext, (char**)NULL, 16); + arg1 = (int)strtol(debugtext, (char**)NULL, 16); if ((arg1 < 0) || (arg1 > 0xFF)) { sprintf(second_buf[num_buffer_lines++], "invalid opcode"); return BREAK; @@ -657,7 +657,7 @@ ADDRS [0-9a-fA-F]+ while (!isspace(*debugtext)) ++debugtext; while (*debugtext) { - arg1 = strtol(debugtext, &debugtext, 10); + arg1 = (int)strtol(debugtext, &debugtext, 10); if ((arg1 < 1) || (arg1 > MAX_BRKPTS)) { sprintf(second_buf[num_buffer_lines++], "invalid watchpoint"); return IGNORE; @@ -681,7 +681,7 @@ ADDRS [0-9a-fA-F]+ while (!isspace(*debugtext)) ++debugtext; while (*debugtext) { - arg1 = strtol(debugtext, &debugtext, 10); + arg1 = (int)strtol(debugtext, &debugtext, 10); if ((arg1 < 1) || (arg1 > MAX_BRKPTS)) { sprintf(second_buf[num_buffer_lines++], "invalid breakpoint"); return CLEAR; @@ -698,7 +698,7 @@ ADDRS [0-9a-fA-F]+ ++debugtext; while (*debugtext) { - arg1 = strtol(debugtext, &debugtext, 16); + arg1 = (int)strtol(debugtext, &debugtext, 16); if ((arg1 < 0) || (arg1 > 255)) { sprintf(second_buf[num_buffer_lines++], "invalid opcode"); return CLEAR; @@ -742,7 +742,7 @@ ADDRS [0-9a-fA-F]+ /* search memory for */ while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ while (isspace(*debugtext)) ++debugtext; @@ -757,7 +757,7 @@ ADDRS [0-9a-fA-F]+ while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); + lc = (int)strtol(debugtext, &debugtext, 10); while (!isspace(*debugtext)) ++debugtext; while (isspace(*debugtext)) ++debugtext; @@ -773,11 +773,11 @@ ADDRS [0-9a-fA-F]+ while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext; if (tolower(*debugtext) == 'c') ++debugtext; - lc = strtol(debugtext, &debugtext, 10); + lc = (int)strtol(debugtext, &debugtext, 10); while (*debugtext != '/') ++debugtext; ++debugtext; /* after / */ - arg3 = strtol(debugtext, &debugtext, 10); + arg3 = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* after / */ while (isspace(*debugtext)) ++debugtext; @@ -794,7 +794,7 @@ ADDRS [0-9a-fA-F]+ while (isspace(*debugtext)) ++debugtext; strncpy(buf, debugtext, DEBUG_BUFSZ-2); - int len = strlen(buf); + int len = (int)strlen(buf); buf[len] = '\r'; buf[len+1] = '\0'; @@ -826,7 +826,7 @@ ADDRS [0-9a-fA-F]+ LOG("Typing..."); int ch = -1; while (fgets(buf, DEBUG_BUFSZ, fp)) { - LOG(buf); + LOG("%s", buf); stepping_struct_t s = { .step_type = LOADING, @@ -896,20 +896,20 @@ ADDRS [0-9a-fA-F]+ /* copy file name */ ptr = debugtext; while (!isspace(*debugtext)) ++debugtext; - int len = MIN(debugtext - ptr, DEBUG_BUFSZ-1); + int len = MIN((int)(debugtext-ptr), DEBUG_BUFSZ-1); strncpy(buf, ptr, len); buf[len] = '\0'; /* get bank info */ while (*debugtext != '/') ++debugtext; ++debugtext; - int bank = strtol(debugtext, &debugtext, 10); + int bank = (int)strtol(debugtext, &debugtext, 10); ++debugtext; /* extract addrs and len */ - unsigned int addrs = strtol(debugtext, &debugtext, 16); + unsigned int addrs = (int)strtol(debugtext, &debugtext, 16); while (isspace(*debugtext)) ++debugtext; - len = strtol(debugtext, &debugtext, 16); + len = (int)strtol(debugtext, &debugtext, 16); if (addrs+len > 0x10000) { sprintf(second_buf[num_buffer_lines++], "buffer length overflow"); @@ -924,7 +924,7 @@ ADDRS [0-9a-fA-F]+ } do { - int written = fwrite(apple_ii_64k[bank]+addrs, 1, len, fp); + size_t written = fwrite(apple_ii_64k[bank]+addrs, 1, len, fp); len -= written; addrs += written; } while(len); diff --git a/src/meta/debugger.c b/src/meta/debugger.c index ce96fb48..ed9c2dc2 100644 --- a/src/meta/debugger.c +++ b/src/meta/debugger.c @@ -42,6 +42,7 @@ int arg1, arg2, arg3; /* command arguments */ int breakpoints[MAX_BRKPTS]; /* memory breakpoints */ int watchpoints[MAX_BRKPTS]; /* memory watchpoints */ +#ifdef INTERFACE_CLASSIC /* debugger globals */ //1. 5. 10. 15. 20. 25. 30. 35. 40. 45. 50. 55. 60. 65. 70. 75. 80.", static char screen[SCREEN_Y][SCREEN_X] = @@ -71,6 +72,7 @@ static char screen[SCREEN_Y][SCREEN_X] = "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" }; static char command_buf[BUF_Y][BUF_X]; /* command line prompt */ +#endif char lexbuf[BUF_X+2]; /* comman line to be flex'ed */ uint8_t current_opcode; @@ -455,7 +457,7 @@ void set_lc_mem(int addrs, int lcbank, char *hexstr) { ------------------------------------------------------------------------- */ void bload(FILE *f, char *name, int bank, int addrs) { uint8_t *hexstr = NULL; - int len = -1; + size_t len = -1; uint8_t data; if ((addrs < 0) || (addrs > 0xffff)) @@ -995,7 +997,9 @@ void show_misc_info() { ------------------------------------------------------------------------- */ void show_disk_info() { static char tmp[32]; - int i = num_buffer_lines, len = 0, off = 19; + int i = num_buffer_lines; + size_t len = 0; + int off = 19; /* generic information */ sprintf(second_buf[i++], "drive %s", (disk6.drive) ? "B" : "A"); @@ -1126,7 +1130,7 @@ static int begin_cpu_stepping() { g_bFullSpeed = true; unsigned int idx = 0; - unsigned int textlen = 0; + size_t textlen = 0; if (stepping_struct.step_text) { textlen = strlen(stepping_struct.step_text); } diff --git a/src/prefs.c b/src/prefs.c index 68531b9f..b9378475 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -75,14 +75,6 @@ static const struct match_table prefs_table[] = { 0, PRM_NONE } }; -static const struct match_table modes_table[] = -{ - { "][+", II_MODE }, - { "][+ undocumented", IIU_MODE }, - { "//e", IIE_MODE }, - { 0, IIE_MODE } -}; - static const struct match_table color_table[] = { { "black/white", COLOR_NONE }, @@ -379,7 +371,7 @@ bool save_settings(void) #define ERROR_SUBMENU_H 9 #define ERROR_SUBMENU_W 40 - int ch = -1; +#ifdef INTERFACE_CLASSIC char submenu[ERROR_SUBMENU_H][ERROR_SUBMENU_W+1] = //1. 5. 10. 15. 20. 25. 30. 35. 40. { "||||||||||||||||||||||||||||||||||||||||", @@ -391,6 +383,7 @@ bool save_settings(void) "| |", "| |", "||||||||||||||||||||||||||||||||||||||||" }; +#endif config_file = fopen(config_filename, "w"); if (config_file == NULL) @@ -398,7 +391,7 @@ bool save_settings(void) PREFS_ERRPRINT(); #ifdef INTERFACE_CLASSIC c_interface_print_submenu_centered(submenu[0], ERROR_SUBMENU_W, ERROR_SUBMENU_H); - while ((ch = c_mygetch(1)) == -1) + while ((int ch = c_mygetch(1)) == -1) { } #endif diff --git a/src/timing.c b/src/timing.c index dccf8f03..3230ca1a 100644 --- a/src/timing.c +++ b/src/timing.c @@ -252,9 +252,9 @@ void cpu_thread(void *dummyptr) { #ifndef NDEBUG dbg_cycles_executed += cpu65_cycle_count; #endif +#ifdef AUDIO_ENABLED unsigned int uExecutedCycles = cpu65_cycle_count; -#ifdef AUDIO_ENABLED MB_UpdateCycles(uExecutedCycles); // Update 6522s (NB. Do this before updating g_nCumulativeCycles below) // N.B.: IO calls that depend on accurate timing will update g_nCyclesExecuted diff --git a/src/zlib-helpers.c b/src/zlib-helpers.c index fd836896..0ca50d26 100644 --- a/src/zlib-helpers.c +++ b/src/zlib-helpers.c @@ -92,7 +92,7 @@ const char *def(const char* const src, const int expected_bytecount) } if (buflen > 0) { - int written = gzwrite(gzdest, buf, buflen); + size_t written = gzwrite(gzdest, buf, buflen); if (written < buflen) { ERRLOG("OOPS gzwrite ..."); break; @@ -158,7 +158,7 @@ const char *inf(const char* const src, int *rawcount) break; } - int len = strlen(src); + size_t len = strlen(src); char dst[PATH_MAX]; snprintf(dst, PATH_MAX-1, "%s", src); if (! ( (dst[len-3] == '.') && (dst[len-2] == 'g') && (dst[len-1] == 'z') ) ) {