1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-28 04:38:00 +00:00

Fix a few sign-conversion and shorten-64-to-32 warnings while converting some values from int to unsigned

This commit is contained in:
Nick Briggs
2022-12-23 18:50:35 -08:00
parent 60a9497e7a
commit 43809d070b
7 changed files with 16 additions and 16 deletions

View File

@@ -108,11 +108,11 @@ LispPTR *fixp_value(LispPTR *ptr) {
#define PAGES_IN_MBYTE 2048
void init_ifpage(int sysout_size) {
void init_ifpage(unsigned sysout_size) {
extern const time_t MDate;
extern int DisplayType;
extern int Storage_expanded;
int new_lastvmem;
unsigned new_lastvmem;
/*
Initialize IFPAGE
*/

View File

@@ -54,7 +54,7 @@ extern DspInterface currentdsp;
#endif /* DOS || XWINDOW */
/* sys_size is sysout size in megabytes */
int sysout_loader(const char *sysout_file_name, int sys_size) {
unsigned sysout_loader(const char *sysout_file_name, unsigned sys_size) {
int sysout; /* SysoutFile descriptor */
IFPAGE ifpage; /* IFPAGE */
@@ -72,7 +72,6 @@ int sysout_loader(const char *sysout_file_name, int sys_size) {
unsigned sysout_size; /* sysout size in page */
struct stat stat_buf; /* file stat buf */
int i;
char errmsg[255];
@@ -199,7 +198,7 @@ int sysout_loader(const char *sysout_file_name, int sys_size) {
perror("sysout_loader: can't get sysout file size");
exit(-1);
}
sysout_size = stat_buf.st_size / BYTESPER_PAGE * 2;
sysout_size = (unsigned)(stat_buf.st_size / BYTESPER_PAGE * 2);
DBPRINT(("sysout size / 2 = 0x%x\n", sysout_size / 2));
DBPRINT(("vmem size = 0x%x\n", ifpage.nactivepages));
@@ -274,7 +273,7 @@ int sysout_loader(const char *sysout_file_name, int sys_size) {
/* read sysout file to lispworld */
for (i = 0; i < (sysout_size / 2); i++) {
for (unsigned i = 0; i < (sysout_size / 2); i++) {
#ifdef DOS
/* Dial that floats from left to right on the top line of the */
/* displaty. Dial shows % of sysout loaded by digits and */

View File

@@ -230,7 +230,7 @@ int display_max = 65536 * 16 * 2;
extern int maxpages;
char sysout_name[MAXPATHLEN]; /* Set by read_Xoption, in the X version. */
int sysout_size = 0; /* ditto */
unsigned sysout_size = 0; /* ditto */
int flushing = FALSE; /* see dbprint.h if set, all debug/trace printing will call fflush(stdout) after each printf */
@@ -400,7 +400,7 @@ int main(int argc, char *argv[])
errno = 0;
tmpint = strtol(argv[i], (char **)NULL, 10);
if (errno == 0 && tmpint > 0) {
sysout_size = tmpint;
sysout_size = (unsigned)tmpint;
} else {
fprintf(stderr, "Bad value for -m (integer > 0)\n");
exit(1);

View File

@@ -87,7 +87,8 @@ extern char Icon_Title[255];
char Icon_Title[255];
extern char sysout_name[];
extern int sysout_size, for_makeinit, please_fork, noscroll;
extern unsigned sysout_size;
extern int for_makeinit, please_fork, noscroll;
/* diagnostic flag for sysout dumping */
/* extern int maxpages; */
@@ -304,7 +305,7 @@ void read_Xoption(int *argc, char *argv[])
errno = 0;
i = (int)strtol(tmp, (char **)NULL, 10);
if (errno == 0 && i > 0)
sysout_size = i;
sysout_size = (unsigned)i;
}
if (XrmGetResource(rDB, "ldex.Init", "Ldex.Init", str_type, &value) == True) { for_makeinit = 1; }