aboutsummaryrefslogtreecommitdiff
path: root/libobjc/sarray.c
diff options
context:
space:
mode:
authorKaveh Ghazi <ghazi@caip.rutgers.edu>2002-06-15 17:50:14 +0000
committerKaveh Ghazi <ghazi@caip.rutgers.edu>2002-06-15 17:50:14 +0000
commit292f9c09a88ce48c9be40e7d9825c0a58383c70c (patch)
treecd175472b2e9e3cb8c294184c253b7e74efaff38 /libobjc/sarray.c
parentdaf4eabf6a790998b49f4f4728256e10913420ce (diff)
* Object.m: Fix signed/unsigned warning.
* Protocol.m: Likewise. * archive.c: Always include stdlib.h. (objc_read_short, objc_read_unsigned_short, objc_read_int, objc_read_long, __objc_read_nbyte_uint, __objc_read_nbyte_ulong): Fix signed/unsigned warning. (objc_write_type, objc_read_type, objc_write_types, objc_read_types): Ensure ctype 8-bit safety. (__objc_no_write, __objc_no_read): Mark unused parameters. * class.c (class_table_setup): Specify void arg. * encoding.c (atoi, objc_sizeof_type, objc_alignof_type, objc_skip_typespec, objc_skip_offset, objc_layout_structure_next_member): Ensure ctype 8-bit safety. (objc_layout_structure_next_member): Ensure variables are initialized. * gc.c (__objc_generate_gc_type_description, class_ivar_set_gcinvisible): Mark unused parameters. * init.c (__objc_send_load, __objc_destroy_class_tree_node): Mark unused parameters. (__objc_init_protocols) Fix signed/unsigned warning. * nil_method.c (nil_method): Mark unused parameters. * thr.h (objc_thread_callback): Specify void arg. * sarray.c (sarray_new, sarray_realloc, sarray_free): Fix signed/unsigned warning. (sarray_free): Fix formatting. * selector.c (sel_types_match): Ensure ctype 8-bit safety. * sendmsg.c (__objc_init_install_dtable) Mark unused parameters. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@54649 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/sarray.c')
-rw-r--r--libobjc/sarray.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libobjc/sarray.c b/libobjc/sarray.c
index 4625fbe4559..14135af8004 100644
--- a/libobjc/sarray.c
+++ b/libobjc/sarray.c
@@ -211,7 +211,7 @@ sarray_new (int size, void* default_element)
size_t num_indices = ((size-1)/BUCKET_SIZE)+1;
struct sbucket ** new_buckets;
#endif
- int counter;
+ size_t counter;
assert(size > 0);
@@ -302,7 +302,7 @@ sarray_realloc(struct sarray* array, int newsize)
#endif
- int counter;
+ size_t counter;
assert(newsize > 0);
@@ -382,8 +382,8 @@ sarray_realloc(struct sarray* array, int newsize)
/* Free a sparse array allocated with sarray_new */
void
-sarray_free(struct sarray* array) {
-
+sarray_free(struct sarray* array)
+{
#ifdef OBJC_SPARSE3
size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY;
struct sindex ** old_indices;
@@ -391,7 +391,7 @@ sarray_free(struct sarray* array) {
size_t old_max_index = (array->capacity-1)/BUCKET_SIZE;
struct sbucket ** old_buckets;
#endif
- int counter = 0;
+ size_t counter = 0;
assert(array->ref_count != 0); /* Freed multiple times!!! */