+2008-11-21 Kai Tietz <kai.tietz@onevision.com>
+
+ * Object.m (errno): Replaced by errno.h include.
+ (compare): Cast self to id to prevent warning on comparison.
+ * objc/objc.h (BOOL): Prevent redeclaration of BOOL, if it is
+ already there.
+ * sendmsg.c (__objc_print_dtable_stats): Remove type warnings.
+ * thr-win32.c (__objc_thread_detach): Remove type warning.
+ (__objc_thread_id): Likewise.
+ * thr.c (__objc_thread_detach_functiont): Add __builtin_trap ()
+ for noreturn.
+
2008-09-26 Peter O'Gorman <pogma@thewrittenword.com>
Steve Ellcey <sje@cup.hp.com>
executable file might be covered by the GNU General Public License. */
#include <stdarg.h>
+#include <errno.h>
#include "objc/Object.h"
#include "objc/Protocol.h"
#include "objc/objc-api.h"
-extern int errno;
-
#define MAX_CLASS_NAME_LEN 256
@implementation Object
return 0;
// Ordering objects by their address is pretty useless,
// so subclasses should override this is some useful way.
- else if (self > anotherObject)
+ else if ((id)self > anotherObject)
return 1;
else
return -1;
#ifdef __vxworks
typedef int BOOL;
#else
+#undef BOOL
typedef unsigned char BOOL;
#endif
#define YES (BOOL)1
#endif
printf ("arrays: %d = %ld bytes\n", narrays,
- (long) (narrays * sizeof (struct sarray)));
+ (long) ((size_t) narrays * sizeof (struct sarray)));
total += narrays * sizeof (struct sarray);
printf ("buckets: %d = %ld bytes\n", nbuckets,
- (long) (nbuckets * sizeof (struct sbucket)));
+ (long) ((size_t) nbuckets * sizeof (struct sbucket)));
total += nbuckets * sizeof (struct sbucket);
printf ("idxtables: %d = %ld bytes\n",
- idxsize, (long) (idxsize * sizeof (void *)));
+ idxsize, (long) ((size_t) idxsize * sizeof (void *)));
total += idxsize * sizeof (void *);
printf ("-----------------------------------\n");
printf ("total: %d bytes\n", total);
arg, 0, &thread_id)))
thread_id = 0;
- return (objc_thread_t)thread_id;
+ return (objc_thread_t)(size_t) thread_id;
}
/* Set the current thread's priority. */
objc_thread_t
__objc_thread_id(void)
{
- return (objc_thread_t)GetCurrentThreadId();
+ return (objc_thread_t)(size_t) GetCurrentThreadId();
}
/* Sets the thread's local storage pointer. */
/* Exit the thread */
objc_thread_exit ();
+
+ /* Make sure compiler detects no return. */
+ __builtin_trap ();
}
/*