aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-26 12:49:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-26 12:49:53 -0300
commitb678e465a1108ccb665744b9e637ccb218859fe6 (patch)
treef7ce14d1acc173b55b80e788cedd8043f87e9849
parent72d675aba78d59e22ebfadbe447f4f51ddab5a5c (diff)
downloadlua-b678e465a1108ccb665744b9e637ccb218859fe6.tar.gz
lua-b678e465a1108ccb665744b9e637ccb218859fe6.tar.bz2
lua-b678e465a1108ccb665744b9e637ccb218859fe6.zip
warnings in Solaris
-rw-r--r--lstring.c4
-rw-r--r--lstrlib.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lstring.c b/lstring.c
index aaddd649..db15fc60 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.c,v 1.17 1999/01/25 17:38:04 roberto Exp roberto $ 2** $Id: lstring.c,v 1.18 1999/02/08 16:28:48 roberto Exp roberto $
3** String table (keeps all strings handled by Lua) 3** String table (keeps all strings handled by Lua)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -173,7 +173,7 @@ TaggedString *luaS_createudata (void *udata, int tag) {
173} 173}
174 174
175TaggedString *luaS_newlstr (char *str, long l) { 175TaggedString *luaS_newlstr (char *str, long l) {
176 int t = (l==0) ? 0 : ((unsigned char)str[0]*l)%NUM_HASHSTR; 176 int t = (l==0) ? 0 : ((int)((unsigned char)str[0]*l))%NUM_HASHSTR;
177 return insert_s(str, l, &L->string_root[t]); 177 return insert_s(str, l, &L->string_root[t]);
178} 178}
179 179
diff --git a/lstrlib.c b/lstrlib.c
index 551bd445..ac0b4f24 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.26 1999/02/12 19:23:02 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.27 1999/02/25 19:13:56 roberto Exp roberto $
3** Standard library for strings and pattern-matching 3** Standard library for strings and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -209,7 +209,7 @@ int luaI_singlematch (int c, char *p, char **ep) {
209 } 209 }
210 else if ((*(p+1) == '-') && (p+2 < end)) { 210 else if ((*(p+1) == '-') && (p+2 < end)) {
211 p+=2; 211 p+=2;
212 if ((unsigned char)*(p-2) <= c && c <= (unsigned char)*p) 212 if ((int)(unsigned char)*(p-2) <= c && c <= (int)(unsigned char)*p)
213 return sig; 213 return sig;
214 } 214 }
215 else if ((unsigned char)*p == c) return sig; 215 else if ((unsigned char)*p == c) return sig;