(sarray_realloc): Make array index variables size_t.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 16 May 1995 21:46:42 +0000 (17:46 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 16 May 1995 21:46:42 +0000 (17:46 -0400)
From-SVN: r9721

gcc/objc/sarray.c

index 78f5339596a1aa86dcf294f7ed6a664d02bbd7cb..c22bc30a18b25b36090e8bf00aa0a19452eb084b 100644 (file)
@@ -1,5 +1,5 @@
 /* Sparse Arrays for Objective C dispatch tables
-   Copyright (C) 1993 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1995 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -218,14 +218,14 @@ void
 sarray_realloc(struct sarray* array, int newsize)
 {
 #ifdef OBJC_SPARSE3
-  int old_max_index = (array->capacity-1)/INDEX_CAPACITY;
-  int new_max_index = ((newsize-1)/INDEX_CAPACITY);
-  int rounded_size = (new_max_index+1)*INDEX_CAPACITY;
+  size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY;
+  size_t new_max_index = ((newsize-1)/INDEX_CAPACITY);
+  size_t rounded_size = (new_max_index+1)*INDEX_CAPACITY;
 
 #else /* OBJC_SPARSE2 */
-  int old_max_index = (array->capacity-1)/BUCKET_SIZE;
-  int new_max_index = ((newsize-1)/BUCKET_SIZE);
-  int rounded_size = (new_max_index+1)*BUCKET_SIZE;
+  size_t old_max_index = (array->capacity-1)/BUCKET_SIZE;
+  size_t new_max_index = ((newsize-1)/BUCKET_SIZE);
+  size_t rounded_size = (new_max_index+1)*BUCKET_SIZE;
 
 #endif