Fix remaining warnings in windows and linux builds
This commit is contained in:
32
src/config.c
32
src/config.c
@@ -1104,13 +1104,13 @@ load_floppy_and_cdrom_drives(void)
|
|||||||
p = ini_section_get_string(cat, temp, NULL);
|
p = ini_section_get_string(cat, temp, NULL);
|
||||||
if (p) {
|
if (p) {
|
||||||
if (path_abs(p)) {
|
if (path_abs(p)) {
|
||||||
if (strlen(p) > 255)
|
if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1))
|
||||||
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 255 "
|
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 2047 "
|
||||||
"(fdd_image_history[%i][%i])\n", c, i);
|
"(fdd_image_history[%i][%i])\n", c, i);
|
||||||
else
|
else
|
||||||
snprintf(fdd_image_history[c][i], 255, "%s", p);
|
snprintf(fdd_image_history[c][i], (MAX_IMAGE_PATH_LEN - 1), "%s", p);
|
||||||
} else
|
} else
|
||||||
snprintf(fdd_image_history[c][i], 255, "%s%s%s", usr_path,
|
snprintf(fdd_image_history[c][i], (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path,
|
||||||
path_get_slash(usr_path), p);
|
path_get_slash(usr_path), p);
|
||||||
path_normalize(fdd_image_history[c][i]);
|
path_normalize(fdd_image_history[c][i]);
|
||||||
}
|
}
|
||||||
@@ -1220,13 +1220,13 @@ load_floppy_and_cdrom_drives(void)
|
|||||||
p = ini_section_get_string(cat, temp, NULL);
|
p = ini_section_get_string(cat, temp, NULL);
|
||||||
if (p) {
|
if (p) {
|
||||||
if (path_abs(p)) {
|
if (path_abs(p)) {
|
||||||
if (strlen(p) > 511)
|
if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1))
|
||||||
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 511 "
|
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 2047 "
|
||||||
"(cdrom[%i].image_history[%i])\n", c, i);
|
"(cdrom[%i].image_history[%i])\n", c, i);
|
||||||
else
|
else
|
||||||
snprintf(cdrom[c].image_history[i], 511, "%s", p);
|
snprintf(cdrom[c].image_history[i], (MAX_IMAGE_PATH_LEN - 1), "%s", p);
|
||||||
} else
|
} else
|
||||||
snprintf(cdrom[c].image_history[i], 511, "%s%s%s", usr_path,
|
snprintf(cdrom[c].image_history[i], (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path,
|
||||||
path_get_slash(usr_path), p);
|
path_get_slash(usr_path), p);
|
||||||
path_normalize(cdrom[c].image_history[i]);
|
path_normalize(cdrom[c].image_history[i]);
|
||||||
}
|
}
|
||||||
@@ -1353,13 +1353,13 @@ load_other_removable_devices(void)
|
|||||||
p = ini_section_get_string(cat, temp, NULL);
|
p = ini_section_get_string(cat, temp, NULL);
|
||||||
if (p) {
|
if (p) {
|
||||||
if (path_abs(p)) {
|
if (path_abs(p)) {
|
||||||
if (strlen(p) > 511)
|
if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1))
|
||||||
fatal("load_other_removable_devices(): strlen(p) > 511 "
|
fatal("load_other_removable_devices(): strlen(p) > 2047 "
|
||||||
"(zip_drives[%i].image_history[%i])\n", c, i);
|
"(zip_drives[%i].image_history[%i])\n", c, i);
|
||||||
else
|
else
|
||||||
snprintf(zip_drives[c].image_history[i], 511, "%s", p);
|
snprintf(zip_drives[c].image_history[i], (MAX_IMAGE_PATH_LEN - 1), "%s", p);
|
||||||
} else
|
} else
|
||||||
snprintf(zip_drives[c].image_history[i], 511, "%s%s%s", usr_path,
|
snprintf(zip_drives[c].image_history[i], (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path,
|
||||||
path_get_slash(usr_path), p);
|
path_get_slash(usr_path), p);
|
||||||
path_normalize(zip_drives[c].image_history[i]);
|
path_normalize(zip_drives[c].image_history[i]);
|
||||||
}
|
}
|
||||||
@@ -1469,13 +1469,13 @@ load_other_removable_devices(void)
|
|||||||
p = ini_section_get_string(cat, temp, NULL);
|
p = ini_section_get_string(cat, temp, NULL);
|
||||||
if (p) {
|
if (p) {
|
||||||
if (path_abs(p)) {
|
if (path_abs(p)) {
|
||||||
if (strlen(p) > 511)
|
if (strlen(p) > (MAX_IMAGE_PATH_LEN - 1))
|
||||||
fatal("load_other_removable_devices(): strlen(p) > 511 "
|
fatal("load_other_removable_devices(): strlen(p) > 2047 "
|
||||||
"(mo_drives[%i].image_history[%i])\n", c, i);
|
"(mo_drives[%i].image_history[%i])\n", c, i);
|
||||||
else
|
else
|
||||||
snprintf(mo_drives[c].image_history[i], 511, "%s", p);
|
snprintf(mo_drives[c].image_history[i], (MAX_IMAGE_PATH_LEN - 1), "%s", p);
|
||||||
} else
|
} else
|
||||||
snprintf(mo_drives[c].image_history[i], 511, "%s%s%s", usr_path,
|
snprintf(mo_drives[c].image_history[i], (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path,
|
||||||
path_get_slash(usr_path), p);
|
path_get_slash(usr_path), p);
|
||||||
path_normalize(mo_drives[c].image_history[i]);
|
path_normalize(mo_drives[c].image_history[i]);
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
/* Recently used images */
|
/* Recently used images */
|
||||||
#define MAX_PREV_IMAGES 4
|
#define MAX_PREV_IMAGES 4
|
||||||
#define MAX_IMAGE_PATH_LEN 256
|
#define MAX_IMAGE_PATH_LEN 2048
|
||||||
|
|
||||||
/* Default language 0xFFFF = from system, 0x409 = en-US */
|
/* Default language 0xFFFF = from system, 0x409 = en-US */
|
||||||
#define DEFAULT_LANGUAGE 0x0409
|
#define DEFAULT_LANGUAGE 0x0409
|
||||||
|
@@ -3312,7 +3312,7 @@ nic_init(const device_t *info)
|
|||||||
|
|
||||||
fp = nvr_fopen(eeprom_filename, "rb");
|
fp = nvr_fopen(eeprom_filename, "rb");
|
||||||
if (fp) {
|
if (fp) {
|
||||||
fread(s->eeprom.contents, 2, 64, fp);
|
(void) !fread(s->eeprom.contents, 2, 64, fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
fp = NULL;
|
fp = NULL;
|
||||||
} else {
|
} else {
|
||||||
|
@@ -918,7 +918,7 @@ monitor_thread(void *param)
|
|||||||
line = f_readline("(86Box) ");
|
line = f_readline("(86Box) ");
|
||||||
else {
|
else {
|
||||||
printf("(86Box) ");
|
printf("(86Box) ");
|
||||||
!getline(&line, &n, stdin);
|
(void) !getline(&line, &n, stdin);
|
||||||
}
|
}
|
||||||
if (line) {
|
if (line) {
|
||||||
int cmdargc = 0;
|
int cmdargc = 0;
|
||||||
|
Reference in New Issue
Block a user