Merge from trunk.
[bpt/emacs.git] / src / casetab.c
index dbc72f4..c28f0c0 100644 (file)
@@ -194,8 +194,7 @@ set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
 {
   if (NATNUMP (elt))
     {
-      int from;
-      unsigned to;
+      int from, to;
 
       if (CONSP (c))
        {
@@ -204,7 +203,10 @@ set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
        }
       else
        from = to = XINT (c);
-      for (to++; from < to; from++)
+
+      to++;
+      lint_assume (to <= MAX_CHAR + 1);
+      for (; from < to; from++)
        CHAR_TABLE_SET (table, from, make_number (from));
     }
 }
@@ -219,8 +221,7 @@ shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
 {
   if (NATNUMP (elt))
     {
-      int from;
-      unsigned to;
+      int from, to;
 
       if (CONSP (c))
        {
@@ -230,7 +231,9 @@ shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
       else
        from = to = XINT (c);
 
-      for (to++; from < to; from++)
+      to++;
+      lint_assume (to <= MAX_CHAR + 1);
+      for (; from < to; from++)
        {
          Lisp_Object tem = Faref (table, elt);
          Faset (table, elt, make_number (from));