summaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-02-28 07:06:53 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-02-28 07:06:53 +0000
commit7d27e4c9717483c47ad37b3ce0fc00c97d218fb3 (patch)
tree6685fdcda742726b5edb9dbde23a6e7176b93726 /gcc/objc
parent6ea4b6a818aa50e62647e44f3fe8d2a99de2533a (diff)
downloadgcc-7d27e4c9717483c47ad37b3ce0fc00c97d218fb3.tar.gz
Fix warious warnings:
* c-aux-info.c: Include string.h/strings.h. * pa.c: Include stdlib.h. (pa_combine_instructions): Prototype the function. (pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise. (reloc_needed): Add default case for enumeration switch. (remove_useless_addtr_insns): Remove unused variable `all'. (hppa_expand_prologue): Add explicit braces to avoid ambiguous `else'. (output_function_epilogue): Remove unused variable `i'. (output_millicode_call): Remove unused variable `link'. (shadd_constant_p, forward_branch_p): Make the function static. (following_call): Explicitly declare to return int. (pa_reorg): Declare as void. (pa_combine_instructions): Declare as static void. Add parentheses around && within ||. * pa.h: Add prototypes for pa_reorg, symbolic_operand, following_call, function_label_operand, lhs_lshift_cint_operand and zdepi_cint_p. * pa.md: Add parentheses around && within ||. * cppalloc.c: Include stdlib.h. * cpperror.c (cpp_print_containing_files): Remove unused variable `i'. Fix format specifier in fprintf. * cse.c (cse_around_loop): Add explicit braces to avoid ambiguous `else'. (delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0. * expr.c (expand_expr): Add parentheses around && within ||. * final.c (app_enable): Replace fprintf with fputs where there are no format specifiers and no trailing argument after the string. Eg, when printing ASM_APP_ON/ASM_APP_OFF. (app_disable): Likewise. (final_end_function): Likewise. (final_scan_insn): Likewise. Remove unused variable `set'. (profile_function): Wrap empty if-statement body in {} brackets. * function.c: Include stdlib.h. (pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD. (reposition_prologue_and_epilogue_notes): Add parentheses around assignment used as truth value. * integrate.c (expand_inline_function): Wrap variable `cc0_insn' in macro HAVE_cc0. * jump.c (jump_optimize): Wrap variable `q' in macro HAVE_cc0. Remove unused variable `prev1'. * libgcc2.c (__bb_exit_trace_func): Add parentheses around && within ||. Fix format specifier in fprintf. (__bb_init_prg): Add parentheses around assignment used as truth value. * local-alloc.c: Include stdlib.h. (requires_inout): Add parentheses around assignment used as truth value. * loop.c (analyze_loop_iterations): Wrap prototype and definition in macro HAVE_decrement_and_branch_on_count. (insert_bct, instrument_loop_bct): Likewise. (move_movables): Add parentheses around assignment used as truth value. (consec_sets_invariant_p): Likewise. (maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0. * objc/objc-act.c: Include stdlib.h. (lookup_method_in_protocol_list): Wrap empty else-statement body in braces. (lookup_protocol_in_reflist): Likewise. (objc_add_static_instance): Remove unused variables `decl_expr' and `decl_spec'. (get_objc_string_decl): Remove unused variable `decl'. (generate_static_references): Remove unused variables `idecl' and `instance'. (check_protocols): Wrap empty else-statement body in braces. * protoize.c: Include stdlib.h. (substr): Add parentheses around assignment used as truth value. (abspath): Likewise. (shortpath): Likewise. * regmove.c (fixup_match_1): Add parentheses around assignment used as truth value. * reload.c (push_secondary_reload): Remove unused variable `i'. (find_reloads): Add parentheses around assignment used as truth value. * reload1.c: Include stdlib.h. * rtl.h: Correct typo in prototype of offsettable_memref_p. * stmt.c (add_case_node): Add parentheses around assignment used as truth value. (case_tree2list): Likewise. * tree.c (valid_machine_attribute): Wrap variable `decl_attr_list' in macro VALID_MACHINE_DECL_ATTRIBUTE. Wrap variable `type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE. (merge_attributes): Add explicit braces to avoid ambiguous `else'. * unroll.c (copy_loop_body): Wrap variable `cc0_insn' in macro HAVE_cc0. * varasm.c: Include stdlib.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/objc-act.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 7ebc0737101..f997ecbb19c 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1,5 +1,5 @@
/* Implement classes and message passing for Objective C.
- Copyright (C) 1992, 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93-95, 97, 1998 Free Software Foundation, Inc.
Contributed by Steve Naroff.
This file is part of GNU CC.
@@ -40,6 +40,9 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#include "tree.h"
#include "c-tree.h"
#include "c-lex.h"
@@ -748,7 +751,9 @@ lookup_method_in_protocol_list (rproto_list, sel_name, class_meth)
sel_name, class_meth);
}
else
- ; /* An identifier...if we could not find a protocol. */
+ {
+ ; /* An identifier...if we could not find a protocol. */
+ }
if (fnd)
return fnd;
@@ -786,7 +791,9 @@ lookup_protocol_in_reflist (rproto_list, lproto)
}
}
else
- ; /* An identifier...if we could not find a protocol. */
+ {
+ ; /* An identifier...if we could not find a protocol. */
+ }
return 0;
}
@@ -1349,7 +1356,7 @@ objc_add_static_instance (constructor, class_decl)
tree constructor, class_decl;
{
static int num_static_inst;
- tree *chain, decl, decl_spec, decl_expr;
+ tree *chain, decl;
char buf[256];
push_obstacks_nochange ();
@@ -1805,7 +1812,7 @@ get_objc_string_decl (ident, section)
tree ident;
enum string_section section;
{
- tree chain, decl;
+ tree chain;
if (section == class_names)
chain = class_names_chain;
@@ -1829,7 +1836,7 @@ static void
generate_static_references ()
{
tree decls = NULL_TREE, ident, decl_spec, expr_decl, expr = NULL_TREE;
- tree class_name, class, decl, instance, idecl, initlist;
+ tree class_name, class, decl, initlist;
tree cl_chain, in_chain, type;
int num_inst, num_class;
char buf[256];
@@ -6028,7 +6035,9 @@ check_protocols (proto_list, type, name)
}
else
- ; /* An identifier if we could not find a protocol. */
+ {
+ ; /* An identifier if we could not find a protocol. */
+ }
/* Check protocols recursively. */
if (PROTOCOL_LIST (p))