Object.m (forward, [...]): Fix unused parameter warnings.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Fri, 21 Jun 2002 14:36:37 +0000 (14:36 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 21 Jun 2002 14:36:37 +0000 (14:36 +0000)
* Object.m (forward, read, write): Fix unused parameter warnings.
* encoding.c: Include <stdlib.h>.
(target_flags): Mark with attribute unused.
(atoi): Delete.
* runtime.h (__objc_selector_max_index): Change to unsigned int.
(__objc_generate_gc_type_description): Prototype.
* selector.c (__objc_selector_max_index): Change to unsigned int.

From-SVN: r54884

libobjc/ChangeLog
libobjc/Object.m
libobjc/encoding.c
libobjc/objc/runtime.h
libobjc/selector.c

index 186b712621e4fc7de4c15d57067ea217aac17397..0cc7b55e172c7e32cb7d218f4ff283232d901920 100644 (file)
@@ -1,3 +1,13 @@
+2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * Object.m (forward, read, write): Fix unused parameter warnings.
+       * encoding.c: Include <stdlib.h>.
+       (target_flags): Mark with attribute unused.
+       (atoi): Delete.
+       * runtime.h (__objc_selector_max_index): Change to unsigned int.
+       (__objc_generate_gc_type_description): Prototype.
+       * selector.c (__objc_selector_max_index): Change to unsigned int.
+
 Mon Jun 17 18:37:42 2002  Nicola Pero  <n.pero@mi.flashnet.it>
 
        * sendmsg.c (__objc_get_forward_imp): Fix warning by making sure
index fd14cb95b6ac9a1fb5f3ff45a8dac005fcd0aae0..1882754d605ef4a75b98c7dcb622eb44b41d61ac 100644 (file)
@@ -1,5 +1,5 @@
 /* The implementation of class Object for Objective-C.
-   Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1995, 1997, 2002 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -271,6 +271,7 @@ extern int errno;
 
 - (retval_t)forward:(SEL)aSel :(arglist_t)argFrame
 {
+  (void) argFrame; /* UNUSED */
   return (retval_t)[self doesNotRecognize: aSel];
 }
 
@@ -364,12 +365,14 @@ extern int errno;
 
 - read: (TypedStream*)aStream
 {
+  (void) aStream; /* UNUSED */
   // [super read: aStream];  
   return self;
 }
 
 - write: (TypedStream*)aStream
 {
+  (void) aStream; /* UNUSED */
   // [super write: aStream];
   return self;
 }
index 956ca16e76dd088a5fc84ce19c11bd1c32d2c058..8fd6e5b26c27d2d4f881d664fefa9d25a4e874b3 100644 (file)
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tconfig.h"
 #include "objc-api.h"
 #include "encoding.h"
+#include <stdlib.h>
 
 #undef  MAX
 #define MAX(X, Y)                    \
@@ -79,19 +80,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Some ROUND_TYPE_ALIGN macros use TARGET_foo, and consequently
    target_flags.  Define a dummy entry here to so we don't die.  */
-
-static int target_flags = 0;
-
-static inline int
-atoi (const char* str)
-{
-  int res = 0;
-
-  while (isdigit ((unsigned char)*str))
-    res *= 10, res += (*str++ - '0');
-
-  return res;
-}
+/* ??? FIXME: As of 2002-06-21, the attribute `unused' doesn't seem to
+   eliminate the warning.  */
+static int __attribute__ ((__unused__)) target_flags = 0;
 
 /*
   return the size of an object specified by type
index b0eae4a222d384642ba0dfc677ef86424d7f4183..bea9253a8be10d31f6d163a61339c60ac36656ea 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU Objective C Runtime internal declarations
-   Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
    Contributed by Kresten Krab Thorup
 
 This file is part of GNU CC.
@@ -65,7 +65,7 @@ extern Method_t search_for_method_in_list(MethodList_t list, SEL op);
 extern BOOL __objc_class_links_resolved;
 
 /* Number of selectors stored in each of the selector  tables */
-extern int __objc_selector_max_index;
+extern unsigned int __objc_selector_max_index;
 
 /* Mutex locking __objc_selector_max_index and its arrays. */
 extern objc_mutex_t __objc_runtime_mutex;
@@ -82,6 +82,7 @@ extern int __objc_runtime_threads_alive;
 BOOL __objc_responds_to (id object, SEL sel); /* for internal use only! */
 SEL  __sel_register_typed_name (const char*, const char*, 
                                struct objc_selector*, BOOL is_const);
+extern void __objc_generate_gc_type_description (Class);
 
 #endif /* not __objc_runtime_INCLUDE_GNU */
 
index 7211f9028b9fdc4a305a9f16a6ce26ff87e253ee..13a2afd181275af6fb0416267746eae60130b0e8 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU Objective C Runtime selector related functions
-   Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
    Contributed by Kresten Krab Thorup
 
 This file is part of GNU CC.
@@ -38,7 +38,7 @@ static cache_ptr      __objc_selector_hash  = 0; /* name -> uid !T:MUTEX */
 static void register_selectors_from_list(MethodList_t);
 
 /* Number of selectors stored in each of the above tables */
-int __objc_selector_max_index = 0;              /* !T:MUTEX */
+unsigned int __objc_selector_max_index = 0;     /* !T:MUTEX */
 
 void __objc_init_selector_tables()
 {