mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-22 02:59:10 +08:00
Object.m: Fix signed/unsigned warning.
* 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. From-SVN: r54649
This commit is contained in:
parent
d5355cb2c6
commit
8f8c44cb4f
@ -1,3 +1,33 @@
|
|||||||
|
2002-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2002-06-09 Andreas Jaeger <aj@suse.de>
|
2002-06-09 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* encoding.c (objc_layout_structure_next_member): Remove unused
|
* encoding.c (objc_layout_structure_next_member): Remove unused
|
||||||
|
@ -199,7 +199,7 @@ extern int errno;
|
|||||||
|
|
||||||
+ (BOOL) conformsTo: (Protocol*)aProtocol
|
+ (BOOL) conformsTo: (Protocol*)aProtocol
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
struct objc_protocol_list* proto_list;
|
struct objc_protocol_list* proto_list;
|
||||||
id parent;
|
id parent;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ struct objc_method_description_list {
|
|||||||
|
|
||||||
- (BOOL) conformsTo: (Protocol *)aProtocolObject
|
- (BOOL) conformsTo: (Protocol *)aProtocolObject
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
struct objc_protocol_list* proto_list;
|
struct objc_protocol_list* proto_list;
|
||||||
|
|
||||||
if (!strcmp(aProtocolObject->protocol_name, self->protocol_name))
|
if (!strcmp(aProtocolObject->protocol_name, self->protocol_name))
|
||||||
@ -88,9 +88,10 @@ struct objc_method_description_list {
|
|||||||
|
|
||||||
for (proto_list = protocol_list; proto_list; proto_list = proto_list->next)
|
for (proto_list = protocol_list; proto_list; proto_list = proto_list->next)
|
||||||
{
|
{
|
||||||
for (i=0; i < proto_list->count; i++)
|
size_t j;
|
||||||
|
for (j=0; j < proto_list->count; j++)
|
||||||
{
|
{
|
||||||
if ((result = [proto_list->list[i]
|
if ((result = [proto_list->list[j]
|
||||||
descriptionForInstanceMethod: aSel]))
|
descriptionForInstanceMethod: aSel]))
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -114,9 +115,10 @@ struct objc_method_description_list {
|
|||||||
|
|
||||||
for (proto_list = protocol_list; proto_list; proto_list = proto_list->next)
|
for (proto_list = protocol_list; proto_list; proto_list = proto_list->next)
|
||||||
{
|
{
|
||||||
for (i=0; i < proto_list->count; i++)
|
size_t j;
|
||||||
|
for (j=0; j < proto_list->count; j++)
|
||||||
{
|
{
|
||||||
if ((result = [proto_list->list[i]
|
if ((result = [proto_list->list[j]
|
||||||
descriptionForClassMethod: aSel]))
|
descriptionForClassMethod: aSel]))
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -28,10 +28,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "typedstream.h"
|
#include "typedstream.h"
|
||||||
#include "encoding.h"
|
#include "encoding.h"
|
||||||
|
|
||||||
#ifdef HAVE_STDLIB_H
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int fflush(FILE*);
|
extern int fflush(FILE*);
|
||||||
|
|
||||||
@ -566,7 +563,7 @@ objc_read_short (struct objc_typed_stream* stream, short* value)
|
|||||||
{
|
{
|
||||||
int pos = 1;
|
int pos = 1;
|
||||||
int nbytes = buf[0] & _B_NUMBER;
|
int nbytes = buf[0] & _B_NUMBER;
|
||||||
if (nbytes > sizeof (short))
|
if (nbytes > (int) sizeof (short))
|
||||||
objc_error(nil, OBJC_ERR_BAD_DATA,
|
objc_error(nil, OBJC_ERR_BAD_DATA,
|
||||||
"expected short, got bigger (%dbits)", nbytes*8);
|
"expected short, got bigger (%dbits)", nbytes*8);
|
||||||
len = (*stream->read)(stream->physical, buf+1, nbytes);
|
len = (*stream->read)(stream->physical, buf+1, nbytes);
|
||||||
@ -595,7 +592,7 @@ objc_read_unsigned_short (struct objc_typed_stream* stream,
|
|||||||
{
|
{
|
||||||
int pos = 1;
|
int pos = 1;
|
||||||
int nbytes = buf[0] & _B_NUMBER;
|
int nbytes = buf[0] & _B_NUMBER;
|
||||||
if (nbytes > sizeof (short))
|
if (nbytes > (int) sizeof (short))
|
||||||
objc_error(nil, OBJC_ERR_BAD_DATA,
|
objc_error(nil, OBJC_ERR_BAD_DATA,
|
||||||
"expected short, got int or bigger");
|
"expected short, got int or bigger");
|
||||||
len = (*stream->read)(stream->physical, buf+1, nbytes);
|
len = (*stream->read)(stream->physical, buf+1, nbytes);
|
||||||
@ -622,7 +619,7 @@ objc_read_int (struct objc_typed_stream* stream, int* value)
|
|||||||
{
|
{
|
||||||
int pos = 1;
|
int pos = 1;
|
||||||
int nbytes = buf[0] & _B_NUMBER;
|
int nbytes = buf[0] & _B_NUMBER;
|
||||||
if (nbytes > sizeof (int))
|
if (nbytes > (int) sizeof (int))
|
||||||
objc_error(nil, OBJC_ERR_BAD_DATA, "expected int, got bigger");
|
objc_error(nil, OBJC_ERR_BAD_DATA, "expected int, got bigger");
|
||||||
len = (*stream->read)(stream->physical, buf+1, nbytes);
|
len = (*stream->read)(stream->physical, buf+1, nbytes);
|
||||||
(*value) = 0;
|
(*value) = 0;
|
||||||
@ -649,7 +646,7 @@ objc_read_long (struct objc_typed_stream* stream, long* value)
|
|||||||
{
|
{
|
||||||
int pos = 1;
|
int pos = 1;
|
||||||
int nbytes = buf[0] & _B_NUMBER;
|
int nbytes = buf[0] & _B_NUMBER;
|
||||||
if (nbytes > sizeof (long))
|
if (nbytes > (int) sizeof (long))
|
||||||
objc_error(nil, OBJC_ERR_BAD_DATA, "expected long, got bigger");
|
objc_error(nil, OBJC_ERR_BAD_DATA, "expected long, got bigger");
|
||||||
len = (*stream->read)(stream->physical, buf+1, nbytes);
|
len = (*stream->read)(stream->physical, buf+1, nbytes);
|
||||||
(*value) = 0;
|
(*value) = 0;
|
||||||
@ -666,7 +663,8 @@ __inline__ int
|
|||||||
__objc_read_nbyte_uint (struct objc_typed_stream* stream,
|
__objc_read_nbyte_uint (struct objc_typed_stream* stream,
|
||||||
unsigned int nbytes, unsigned int* val)
|
unsigned int nbytes, unsigned int* val)
|
||||||
{
|
{
|
||||||
int len, pos = 0;
|
int len;
|
||||||
|
unsigned int pos = 0;
|
||||||
unsigned char buf[sizeof(unsigned int)+1];
|
unsigned char buf[sizeof(unsigned int)+1];
|
||||||
|
|
||||||
if (nbytes > sizeof (int))
|
if (nbytes > sizeof (int))
|
||||||
@ -702,7 +700,8 @@ int
|
|||||||
__objc_read_nbyte_ulong (struct objc_typed_stream* stream,
|
__objc_read_nbyte_ulong (struct objc_typed_stream* stream,
|
||||||
unsigned int nbytes, unsigned long* val)
|
unsigned int nbytes, unsigned long* val)
|
||||||
{
|
{
|
||||||
int len, pos = 0;
|
int len;
|
||||||
|
unsigned int pos = 0;
|
||||||
unsigned char buf[sizeof(unsigned long)+1];
|
unsigned char buf[sizeof(unsigned long)+1];
|
||||||
|
|
||||||
if (nbytes > sizeof (long))
|
if (nbytes > sizeof (long))
|
||||||
@ -1043,7 +1042,7 @@ objc_write_type(TypedStream* stream, const char* type, const void* data)
|
|||||||
case _C_ARY_B:
|
case _C_ARY_B:
|
||||||
{
|
{
|
||||||
int len = atoi(type+1);
|
int len = atoi(type+1);
|
||||||
while (isdigit(*++type))
|
while (isdigit((unsigned char)*++type))
|
||||||
;
|
;
|
||||||
return objc_write_array (stream, type, len, data);
|
return objc_write_array (stream, type, len, data);
|
||||||
}
|
}
|
||||||
@ -1139,7 +1138,7 @@ objc_read_type(TypedStream* stream, const char* type, void* data)
|
|||||||
case _C_ARY_B:
|
case _C_ARY_B:
|
||||||
{
|
{
|
||||||
int len = atoi(type+1);
|
int len = atoi(type+1);
|
||||||
while (isdigit(*++type))
|
while (isdigit((unsigned char)*++type))
|
||||||
;
|
;
|
||||||
return objc_read_array (stream, type, len, data);
|
return objc_read_array (stream, type, len, data);
|
||||||
}
|
}
|
||||||
@ -1257,7 +1256,7 @@ objc_write_types (TypedStream* stream, const char* type, ...)
|
|||||||
{
|
{
|
||||||
int len = atoi(c+1);
|
int len = atoi(c+1);
|
||||||
const char* t = c;
|
const char* t = c;
|
||||||
while (isdigit(*++t))
|
while (isdigit((unsigned char)*++t))
|
||||||
;
|
;
|
||||||
res = objc_write_array (stream, t, len, va_arg(args, void*));
|
res = objc_write_array (stream, t, len, va_arg(args, void*));
|
||||||
t = objc_skip_typespec (t);
|
t = objc_skip_typespec (t);
|
||||||
@ -1349,7 +1348,7 @@ objc_read_types(TypedStream* stream, const char* type, ...)
|
|||||||
{
|
{
|
||||||
int len = atoi(c+1);
|
int len = atoi(c+1);
|
||||||
const char* t = c;
|
const char* t = c;
|
||||||
while (isdigit(*++t))
|
while (isdigit((unsigned char)*++t))
|
||||||
;
|
;
|
||||||
res = objc_read_array (stream, t, len, va_arg(args, void*));
|
res = objc_read_array (stream, t, len, va_arg(args, void*));
|
||||||
t = objc_skip_typespec (t);
|
t = objc_skip_typespec (t);
|
||||||
@ -1428,14 +1427,18 @@ __objc_feof(FILE* file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
__objc_no_write(FILE* file, char* data, int len)
|
__objc_no_write(FILE* file __attribute__ ((__unused__)),
|
||||||
|
const char *data __attribute__ ((__unused__)),
|
||||||
|
int len __attribute__ ((__unused__)))
|
||||||
{
|
{
|
||||||
objc_error (nil, OBJC_ERR_NO_WRITE, "TypedStream not open for writing");
|
objc_error (nil, OBJC_ERR_NO_WRITE, "TypedStream not open for writing");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
__objc_no_read(FILE* file, char* data, int len)
|
__objc_no_read(FILE* file __attribute__ ((__unused__)),
|
||||||
|
const char *data __attribute__ ((__unused__)),
|
||||||
|
int len __attribute__ ((__unused__)))
|
||||||
{
|
{
|
||||||
objc_error (nil, OBJC_ERR_NO_READ, "TypedStream not open for reading");
|
objc_error (nil, OBJC_ERR_NO_READ, "TypedStream not open for reading");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -163,7 +163,7 @@ static objc_mutex_t __class_table_lock = NULL;
|
|||||||
|
|
||||||
/* Setup the table. */
|
/* Setup the table. */
|
||||||
static void
|
static void
|
||||||
class_table_setup ()
|
class_table_setup (void)
|
||||||
{
|
{
|
||||||
/* Start - nothing in the table. */
|
/* Start - nothing in the table. */
|
||||||
memset (class_table_array, 0, sizeof(class_node_ptr) * CLASS_TABLE_SIZE);
|
memset (class_table_array, 0, sizeof(class_node_ptr) * CLASS_TABLE_SIZE);
|
||||||
|
@ -87,7 +87,7 @@ atoi (const char* str)
|
|||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
while (isdigit (*str))
|
while (isdigit ((unsigned char)*str))
|
||||||
res *= 10, res += (*str++ - '0');
|
res *= 10, res += (*str++ - '0');
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@ -180,7 +180,7 @@ objc_sizeof_type (const char* type)
|
|||||||
case _C_ARY_B:
|
case _C_ARY_B:
|
||||||
{
|
{
|
||||||
int len = atoi(type+1);
|
int len = atoi(type+1);
|
||||||
while (isdigit(*++type));
|
while (isdigit((unsigned char)*++type));
|
||||||
return len*objc_aligned_size (type);
|
return len*objc_aligned_size (type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -192,7 +192,7 @@ objc_sizeof_type (const char* type)
|
|||||||
int startByte, endByte;
|
int startByte, endByte;
|
||||||
|
|
||||||
position = atoi (type + 1);
|
position = atoi (type + 1);
|
||||||
while (isdigit (*++type));
|
while (isdigit ((unsigned char)*++type));
|
||||||
size = atoi (type + 1);
|
size = atoi (type + 1);
|
||||||
|
|
||||||
startByte = position / BITS_PER_UNIT;
|
startByte = position / BITS_PER_UNIT;
|
||||||
@ -321,7 +321,7 @@ objc_alignof_type(const char* type)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case _C_ARY_B:
|
case _C_ARY_B:
|
||||||
while (isdigit(*++type)) /* do nothing */;
|
while (isdigit((unsigned char)*++type)) /* do nothing */;
|
||||||
return objc_alignof_type (type);
|
return objc_alignof_type (type);
|
||||||
|
|
||||||
case _C_STRUCT_B:
|
case _C_STRUCT_B:
|
||||||
@ -487,7 +487,7 @@ objc_skip_typespec (const char* type)
|
|||||||
case _C_ARY_B:
|
case _C_ARY_B:
|
||||||
/* skip digits, typespec and closing ']' */
|
/* skip digits, typespec and closing ']' */
|
||||||
|
|
||||||
while(isdigit(*++type));
|
while(isdigit((unsigned char)*++type));
|
||||||
type = objc_skip_typespec(type);
|
type = objc_skip_typespec(type);
|
||||||
if (*type == _C_ARY_E)
|
if (*type == _C_ARY_E)
|
||||||
return ++type;
|
return ++type;
|
||||||
@ -499,8 +499,8 @@ objc_skip_typespec (const char* type)
|
|||||||
|
|
||||||
case _C_BFLD:
|
case _C_BFLD:
|
||||||
/* The new encoding of bitfields is: b 'position' 'type' 'size' */
|
/* The new encoding of bitfields is: b 'position' 'type' 'size' */
|
||||||
while (isdigit (*++type)); /* skip position */
|
while (isdigit ((unsigned char)*++type)); /* skip position */
|
||||||
while (isdigit (*++type)); /* skip type and size */
|
while (isdigit ((unsigned char)*++type)); /* skip type and size */
|
||||||
return type;
|
return type;
|
||||||
|
|
||||||
case _C_STRUCT_B:
|
case _C_STRUCT_B:
|
||||||
@ -538,7 +538,7 @@ inline const char*
|
|||||||
objc_skip_offset (const char* type)
|
objc_skip_offset (const char* type)
|
||||||
{
|
{
|
||||||
if (*type == '+') type++;
|
if (*type == '+') type++;
|
||||||
while(isdigit(*++type));
|
while(isdigit((unsigned char)*++type));
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -753,8 +753,8 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout)
|
|||||||
register int desired_align = 0;
|
register int desired_align = 0;
|
||||||
|
|
||||||
/* The following are used only if the field is a bitfield */
|
/* The following are used only if the field is a bitfield */
|
||||||
register const char *bfld_type;
|
register const char *bfld_type = 0;
|
||||||
register int bfld_type_size, bfld_type_align, bfld_field_size;
|
register int bfld_type_size, bfld_type_align = 0, bfld_field_size = 0;
|
||||||
|
|
||||||
/* The current type without the type qualifiers */
|
/* The current type without the type qualifiers */
|
||||||
const char *type;
|
const char *type;
|
||||||
@ -769,7 +769,7 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout)
|
|||||||
else {
|
else {
|
||||||
/* Get the bitfield's type */
|
/* Get the bitfield's type */
|
||||||
for (bfld_type = type + 1;
|
for (bfld_type = type + 1;
|
||||||
isdigit(*bfld_type);
|
isdigit((unsigned char)*bfld_type);
|
||||||
bfld_type++)
|
bfld_type++)
|
||||||
/* do nothing */;
|
/* do nothing */;
|
||||||
|
|
||||||
@ -798,7 +798,7 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout)
|
|||||||
{
|
{
|
||||||
desired_align = 1;
|
desired_align = 1;
|
||||||
/* Skip the bitfield's offset */
|
/* Skip the bitfield's offset */
|
||||||
for (bfld_type = type + 1; isdigit(*bfld_type); bfld_type++)
|
for (bfld_type = type + 1; isdigit((unsigned char)*bfld_type); bfld_type++)
|
||||||
/* do nothing */;
|
/* do nothing */;
|
||||||
|
|
||||||
bfld_type_size = objc_sizeof_type (bfld_type) * BITS_PER_UNIT;
|
bfld_type_size = objc_sizeof_type (bfld_type) * BITS_PER_UNIT;
|
||||||
|
@ -446,13 +446,13 @@ class_ivar_set_gcinvisible (Class class, const char* ivarname,
|
|||||||
#else /* !OBJC_WITH_GC */
|
#else /* !OBJC_WITH_GC */
|
||||||
|
|
||||||
void
|
void
|
||||||
__objc_generate_gc_type_description (Class class)
|
__objc_generate_gc_type_description (Class class __attribute__ ((__unused__)))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void class_ivar_set_gcinvisible (Class class,
|
void class_ivar_set_gcinvisible (Class class __attribute__ ((__unused__)),
|
||||||
const char* ivarname,
|
const char* ivarname __attribute__ ((__unused__)),
|
||||||
BOOL gc_invisible)
|
BOOL gc_invisible __attribute__ ((__unused__)))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,8 @@ __objc_send_message_in_list (MethodList_t method_list, Class class, SEL op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__objc_send_load (objc_class_tree *tree, int level)
|
__objc_send_load (objc_class_tree *tree,
|
||||||
|
int level __attribute__ ((__unused__)))
|
||||||
{
|
{
|
||||||
static SEL load_sel = 0;
|
static SEL load_sel = 0;
|
||||||
Class class = tree->class;
|
Class class = tree->class;
|
||||||
@ -342,7 +343,8 @@ __objc_send_load (objc_class_tree *tree, int level)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__objc_destroy_class_tree_node (objc_class_tree *tree, int level)
|
__objc_destroy_class_tree_node (objc_class_tree *tree,
|
||||||
|
int level __attribute__ ((__unused__)))
|
||||||
{
|
{
|
||||||
objc_free (tree);
|
objc_free (tree);
|
||||||
}
|
}
|
||||||
@ -776,7 +778,7 @@ static void init_check_module_version(Module_t module)
|
|||||||
static void
|
static void
|
||||||
__objc_init_protocols (struct objc_protocol_list* protos)
|
__objc_init_protocols (struct objc_protocol_list* protos)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
static Class proto_class = 0;
|
static Class proto_class = 0;
|
||||||
|
|
||||||
if (! protos)
|
if (! protos)
|
||||||
|
@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
|
|
||||||
id
|
id
|
||||||
nil_method(id receiver, SEL op, ...)
|
nil_method(id receiver, SEL op __attribute__ ((__unused__)), ...)
|
||||||
{
|
{
|
||||||
return receiver;
|
return receiver;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ void objc_thread_remove(void);
|
|||||||
it can be informed; for example, the GNUstep Base Library sets it
|
it can be informed; for example, the GNUstep Base Library sets it
|
||||||
so it can implement the NSBecomingMultiThreaded notification.
|
so it can implement the NSBecomingMultiThreaded notification.
|
||||||
*/
|
*/
|
||||||
typedef void (*objc_thread_callback)();
|
typedef void (*objc_thread_callback)(void);
|
||||||
objc_thread_callback objc_set_thread_callback(objc_thread_callback func);
|
objc_thread_callback objc_set_thread_callback(objc_thread_callback func);
|
||||||
|
|
||||||
/* Backend initialization functions */
|
/* Backend initialization functions */
|
||||||
|
@ -211,7 +211,7 @@ sarray_new (int size, void* default_element)
|
|||||||
size_t num_indices = ((size-1)/BUCKET_SIZE)+1;
|
size_t num_indices = ((size-1)/BUCKET_SIZE)+1;
|
||||||
struct sbucket ** new_buckets;
|
struct sbucket ** new_buckets;
|
||||||
#endif
|
#endif
|
||||||
int counter;
|
size_t counter;
|
||||||
|
|
||||||
assert(size > 0);
|
assert(size > 0);
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ sarray_realloc(struct sarray* array, int newsize)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int counter;
|
size_t counter;
|
||||||
|
|
||||||
assert(newsize > 0);
|
assert(newsize > 0);
|
||||||
|
|
||||||
@ -382,8 +382,8 @@ sarray_realloc(struct sarray* array, int newsize)
|
|||||||
/* Free a sparse array allocated with sarray_new */
|
/* Free a sparse array allocated with sarray_new */
|
||||||
|
|
||||||
void
|
void
|
||||||
sarray_free(struct sarray* array) {
|
sarray_free(struct sarray* array)
|
||||||
|
{
|
||||||
#ifdef OBJC_SPARSE3
|
#ifdef OBJC_SPARSE3
|
||||||
size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY;
|
size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY;
|
||||||
struct sindex ** old_indices;
|
struct sindex ** old_indices;
|
||||||
@ -391,7 +391,7 @@ sarray_free(struct sarray* array) {
|
|||||||
size_t old_max_index = (array->capacity-1)/BUCKET_SIZE;
|
size_t old_max_index = (array->capacity-1)/BUCKET_SIZE;
|
||||||
struct sbucket ** old_buckets;
|
struct sbucket ** old_buckets;
|
||||||
#endif
|
#endif
|
||||||
int counter = 0;
|
size_t counter = 0;
|
||||||
|
|
||||||
assert(array->ref_count != 0); /* Freed multiple times!!! */
|
assert(array->ref_count != 0); /* Freed multiple times!!! */
|
||||||
|
|
||||||
|
@ -164,8 +164,8 @@ sel_types_match (const char* t1, const char* t2)
|
|||||||
{
|
{
|
||||||
if (*t1 == '+') t1++;
|
if (*t1 == '+') t1++;
|
||||||
if (*t2 == '+') t2++;
|
if (*t2 == '+') t2++;
|
||||||
while (isdigit(*t1)) t1++;
|
while (isdigit((unsigned char)*t1)) t1++;
|
||||||
while (isdigit(*t2)) t2++;
|
while (isdigit((unsigned char)*t2)) t2++;
|
||||||
/* xxx Remove these next two lines when qualifiers are put in
|
/* xxx Remove these next two lines when qualifiers are put in
|
||||||
all selectors, not just Protocol selectors. */
|
all selectors, not just Protocol selectors. */
|
||||||
t1 = objc_skip_type_qualifiers(t1);
|
t1 = objc_skip_type_qualifiers(t1);
|
||||||
|
@ -230,7 +230,7 @@ __objc_init_dispatch_tables()
|
|||||||
dispatch table needs to be installed; thus it is called once
|
dispatch table needs to be installed; thus it is called once
|
||||||
for each class, namely when the very first message is sent to it. */
|
for each class, namely when the very first message is sent to it. */
|
||||||
static void
|
static void
|
||||||
__objc_init_install_dtable(id receiver, SEL op)
|
__objc_init_install_dtable(id receiver, SEL op __attribute__ ((__unused__)))
|
||||||
{
|
{
|
||||||
/* This may happen, if the programmer has taken the address of a
|
/* This may happen, if the programmer has taken the address of a
|
||||||
method before the dtable was initialized... too bad for him! */
|
method before the dtable was initialized... too bad for him! */
|
||||||
|
Loading…
Reference in New Issue
Block a user