summaryrefslogtreecommitdiffstats
path: root/gcc/objc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/init.c6
-rw-r--r--gcc/objc/objc-act.c15
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, "[]");
}
OpenPOWER on IntegriCloud