1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-06 08:24:44 +00:00

Reduce number of -Wshorten-64-to-32 warnings. (#138)

This commit is contained in:
Bruce Mitchener
2020-12-28 15:19:26 +07:00
committed by GitHub
parent 999851e60c
commit 14402131e7
3 changed files with 11 additions and 6 deletions

View File

@@ -613,7 +613,8 @@ static int enum_dsk_prop(char *dir, char *name, char *ver, FINFO **finfo_buf)
register struct dirent *dp;
register FINFO *prevp;
register FINFO *nextp;
int n, len, rval;
int n, rval;
size_t len;
DIR *dirp;
register struct passwd *pwd;
struct stat sbuf;
@@ -876,7 +877,8 @@ static int enum_dsk(char *dir, char *name, char *ver, FINFO **finfo_buf)
register struct dirent *dp;
register FINFO *prevp;
register FINFO *nextp;
int n, len, rval;
int n, rval;
size_t len;
DIR *dirp;
struct stat sbuf;
char namebuf[MAXPATHLEN];
@@ -1070,7 +1072,8 @@ static int enum_ufs_prop(char *dir, char *name, char *ver, FINFO **finfo_buf)
register struct dirent *dp;
register FINFO *prevp;
register FINFO *nextp;
int n, len, rval;
int n, rval;
size_t len;
DIR *dirp;
register struct passwd *pwd;
struct stat sbuf;
@@ -1253,7 +1256,8 @@ static int enum_ufs(char *dir, char *name, char *ver, FINFO **finfo_buf)
register struct dirent *dp;
register FINFO *prevp;
register FINFO *nextp;
int n, len, rval;
int n, rval;
size_t len;
DIR *dirp;
struct stat sbuf;
char namebuf[MAXPATHLEN];

View File

@@ -2606,7 +2606,8 @@ static int locate_file(char *dir, char *name)
char path[MAXPATHLEN];
char nb1[MAXNAMLEN], nb2[MAXNAMLEN];
register int type, len;
register int type;
size_t len;
DIR *dirp;
struct dirent *dp;

View File

@@ -165,7 +165,7 @@ are null terminated instead */
if ((pwd = getpwuid(getuid())) != NULL) {
InterfacePage->usernameaddr = 0155001;
s = (char *)Addr68k_from_LADDR(InterfacePage->usernameaddr);
len = strlen(pwd->pw_name);
len = (int)strlen(pwd->pw_name);
/* Lisp reserves 32 words for the BCPL String */
len = (len < 32 * BYTESPER_DLWORD) ? len : 32 * BYTESPER_DLWORD - 1;
*s = (char)len;