diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-22 05:23:33 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-22 05:23:33 +0000 |
commit | ad6c9a5853f72263ee79ceb7afb39e37e8697d85 (patch) | |
tree | 279c567a607717883b54fd2f58e33c32342072aa /gcc/objc | |
parent | 9e2d273738166a11573320e220897da1bda74de1 (diff) | |
download | gcc-ad6c9a5853f72263ee79ceb7afb39e37e8697d85.tar.gz |
Warning fixes:
* Makefile.in (varasm.o): Depend on sdbout.h.
(sdbout.o): Depend on toplev.h.
* collect2.c (scan_prog_file): Cast fprintf argument to `long' and
use %ld specifier.
* final.c (shorten_branches): Cast first arg of `bzero' to char *.
* genextract.c (main): When creating insn-extract.c, mark variable
`i' with ATTRIBUTE_UNUSED.
* genpeep.c (main): When creating insn-peep.c, mark variables
`insn', `x' and `pat' with ATTRIBUTE_UNUSED.
* objc/init.c (__objc_tree_print): Wrap function definition in
macro `DEBUG'.
* objc/objc-act.c (encode_array): Cast sprintf argument to `long'
and use %ld specifier.
(adorn_decl): Likewise, twice.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20650 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/init.c | 6 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 15 |
2 files changed, 12 insertions, 9 deletions
diff --git a/gcc/objc/init.c b/gcc/objc/init.c index 5e56146c423..f1fea812318 100644 --- a/gcc/objc/init.c +++ b/gcc/objc/init.c @@ -59,7 +59,7 @@ static void __objc_class_add_protocols (Class, struct objc_protocol_list*); or a category is loaded into the runtime. This may e.g. help a dynamic loader determine the classes that have been loaded when an object file is dynamically linked in */ -void (*_objc_load_callback)(Class class, Category* category) = 0; /* !T:SAFE */ +void (*_objc_load_callback)(Class class, Category* category); /* !T:SAFE */ /* Is all categories/classes resolved? */ BOOL __objc_dangling_categories = NO; /* !T:UNUSED */ @@ -280,6 +280,7 @@ objc_postorder_traverse (objc_class_tree *tree, } /* Used to print a tree class hierarchy. */ +#ifdef DEBUG static void __objc_tree_print (objc_class_tree *tree, int level) { @@ -289,6 +290,7 @@ __objc_tree_print (objc_class_tree *tree, int level) printf (" "); printf ("%s\n", tree->class->name); } +#endif /* Walks on a linked list of methods in the reverse order and executes all the methods corresponding to `op' selector. Walking in the reverse order @@ -381,7 +383,7 @@ __objc_force_linking (void) /* Run through the statics list, removing modules as soon as all its statics have been initialized. */ static void -objc_init_statics () +objc_init_statics (void) { struct objc_list **cell = &uninitialized_statics; struct objc_static_instances **statics_in_module; diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index e1cde90b094..9f403711909 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -6557,9 +6557,9 @@ encode_array (type, curtype, format) return; } - sprintf (buffer, "[%d", - (TREE_INT_CST_LOW (an_int_cst) - / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); + sprintf (buffer, "[%ld", + (long) (TREE_INT_CST_LOW (an_int_cst) + / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); obstack_grow (&util_obstack, buffer, strlen (buffer)); encode_type (array_of, curtype, format); @@ -7361,7 +7361,8 @@ adorn_decl (decl, str) tree an_int_cst = TREE_OPERAND (decl, 1); if (an_int_cst && TREE_CODE (an_int_cst) == INTEGER_CST) - sprintf (str + strlen (str), "[%d]", TREE_INT_CST_LOW (an_int_cst)); + sprintf (str + strlen (str), "[%ld]", + (long) TREE_INT_CST_LOW (an_int_cst)); else strcat (str, "[]"); } @@ -7372,9 +7373,9 @@ adorn_decl (decl, str) tree array_of = TREE_TYPE (decl); if (an_int_cst && TREE_CODE (an_int_cst) == INTEGER_TYPE) - sprintf (str + strlen (str), "[%d]", - (TREE_INT_CST_LOW (an_int_cst) - / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); + sprintf (str + strlen (str), "[%ld]", + (long) (TREE_INT_CST_LOW (an_int_cst) + / TREE_INT_CST_LOW (TYPE_SIZE (array_of)))); else strcat (str, "[]"); } |