Browse Source

warnings in Solaris

Roberto Ierusalimschy 26 years ago
parent
commit
b678e465a1
2 changed files with 4 additions and 4 deletions
  1. 2 2
      lstring.c
  2. 2 2
      lstrlib.c

+ 2 - 2
lstring.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lstring.c,v 1.17 1999/01/25 17:38:04 roberto Exp roberto $
+** $Id: lstring.c,v 1.18 1999/02/08 16:28:48 roberto Exp roberto $
 ** String table (keeps all strings handled by Lua)
 ** See Copyright Notice in lua.h
 */
@@ -173,7 +173,7 @@ TaggedString *luaS_createudata (void *udata, int tag) {
 }
 
 TaggedString *luaS_newlstr (char *str, long l) {
-  int t = (l==0) ? 0 : ((unsigned char)str[0]*l)%NUM_HASHSTR;
+  int t = (l==0) ? 0 : ((int)((unsigned char)str[0]*l))%NUM_HASHSTR;
   return insert_s(str, l, &L->string_root[t]);
 }
 

+ 2 - 2
lstrlib.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lstrlib.c,v 1.26 1999/02/12 19:23:02 roberto Exp roberto $
+** $Id: lstrlib.c,v 1.27 1999/02/25 19:13:56 roberto Exp roberto $
 ** Standard library for strings and pattern-matching
 ** See Copyright Notice in lua.h
 */
@@ -209,7 +209,7 @@ int luaI_singlematch (int c, char *p, char **ep) {
         }
         else if ((*(p+1) == '-') && (p+2 < end)) {
           p+=2;
-          if ((unsigned char)*(p-2) <= c && c <= (unsigned char)*p)
+          if ((int)(unsigned char)*(p-2) <= c && c <= (int)(unsigned char)*p)
             return sig;
         }
         else if ((unsigned char)*p == c) return sig;