diff options
author | jkh <jkh@FreeBSD.org> | 1996-07-12 19:08:36 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-07-12 19:08:36 +0000 |
commit | 730964efd28b80be48ed35a215a362dde2b6b7a7 (patch) | |
tree | b07c215aa55db3fb81db462f4bc70f61cd56c57f /gnu/usr.bin | |
parent | c4d4a99d31762beef936f34571330923e9300da9 (diff) | |
download | FreeBSD-src-730964efd28b80be48ed35a215a362dde2b6b7a7.zip FreeBSD-src-730964efd28b80be48ed35a215a362dde2b6b7a7.tar.gz |
General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/cc/cc_int/bc-emit.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/c-common.c | 12 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/calls.c | 3 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/combine.c | 42 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/convert.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/cse.c | 29 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/dbxout.c | 3 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/emit-rtl.c | 8 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/explow.c | 8 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/expmed.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/expr.c | 42 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/final.c | 15 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/flow.c | 3 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/fold-const.c | 18 | ||||
-rw-r--r-- | gnu/usr.bin/ld/ld.c | 13 | ||||
-rw-r--r-- | gnu/usr.bin/ld/ldconfig/ldconfig.c | 8 | ||||
-rw-r--r-- | gnu/usr.bin/ld/lib.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/ld/rrs.c | 6 | ||||
-rw-r--r-- | gnu/usr.bin/ld/rtld/malloc.c | 5 | ||||
-rw-r--r-- | gnu/usr.bin/ld/warnings.c | 8 |
20 files changed, 206 insertions, 31 deletions
diff --git a/gnu/usr.bin/cc/cc_int/bc-emit.c b/gnu/usr.bin/cc/cc_int/bc-emit.c index 296fdd9..0128fa3 100644 --- a/gnu/usr.bin/cc/cc_int/bc-emit.c +++ b/gnu/usr.bin/cc/cc_int/bc-emit.c @@ -38,9 +38,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "bi-run.h" #include <stdio.h> +#include <string.h> extern char *xmalloc (), *xrealloc (); + +#ifndef __FreeBSD__ extern void free (); +#endif extern struct obstack *rtl_obstack; diff --git a/gnu/usr.bin/cc/cc_int/c-common.c b/gnu/usr.bin/cc/cc_int/c-common.c index 563c171..1e8124d 100644 --- a/gnu/usr.bin/cc/cc_int/c-common.c +++ b/gnu/usr.bin/cc/cc_int/c-common.c @@ -24,6 +24,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "flags.h" #include "obstack.h" #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <ctype.h> extern struct obstack permanent_obstack; @@ -1457,6 +1459,8 @@ binary_op_error (code) case LROTATE_EXPR: case RROTATE_EXPR: opname = "rotate"; break; + default: + break; } error ("invalid operands to binary %s", opname); } @@ -1543,6 +1547,8 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) case GE_EXPR: code = LE_EXPR; break; + default: + break; } *rescode_ptr = code; } @@ -1673,6 +1679,8 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) primop1 = TYPE_MAX_VALUE (type); val = 0; break; + default: + break; } type = unsigned_type (type); } @@ -1770,6 +1778,8 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) primop0)))) warning ("unsigned value < 0 is always 0"); value = integer_zero_node; + default: + break; } if (value != 0) @@ -1946,6 +1956,8 @@ truthvalue_conversion (expr) if (warn_parentheses && C_EXP_ORIGINAL_CODE (expr) == MODIFY_EXPR) warning ("suggest parentheses around assignment used as truth value"); break; + default: + break; } if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE) diff --git a/gnu/usr.bin/cc/cc_int/calls.c b/gnu/usr.bin/cc/cc_int/calls.c index f567982..4f1089f 100644 --- a/gnu/usr.bin/cc/cc_int/calls.c +++ b/gnu/usr.bin/cc/cc_int/calls.c @@ -28,6 +28,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <varargs.h> #endif #include "insn-flags.h" +#include <string.h> /* Decide whether a function's arguments should be processed from first to last or from last to first. @@ -233,6 +234,8 @@ calls_function_1 (exp, which) case RTL_EXPR: return 0; + default: + break; } for (i = 0; i < length; i++) diff --git a/gnu/usr.bin/cc/cc_int/combine.c b/gnu/usr.bin/cc/cc_int/combine.c index 268434e..5d2d49e 100644 --- a/gnu/usr.bin/cc/cc_int/combine.c +++ b/gnu/usr.bin/cc/cc_int/combine.c @@ -2585,6 +2585,8 @@ find_split_point (loc, insn) unsignedp = (code == ZERO_EXTRACT); } break; + default: + break; } if (len && pos >= 0 && pos + len <= GET_MODE_BITSIZE (GET_MODE (inner))) @@ -2681,6 +2683,8 @@ find_split_point (loc, insn) SUBST (XEXP (x, 1), tem); } break; + default: + break; } /* Otherwise, select our actions depending on our rtx class. */ @@ -3857,6 +3861,8 @@ simplify_rtx (x, op0_mode, last, in_dest) #endif break; + default: + break; } return x; @@ -3990,6 +3996,8 @@ simplify_if_then_else (x) case LT: case LE: return gen_unary (NEG, mode, mode, gen_unary (ABS, mode, mode, true)); + default: + break; } /* Look for MIN or MAX. */ @@ -4013,6 +4021,8 @@ simplify_if_then_else (x) case LEU: case LTU: return gen_binary (UMIN, mode, true, false); + default: + break; } #if STORE_FLAG_VALUE == 1 || STORE_FLAG_VALUE == -1 @@ -4692,6 +4702,8 @@ simplify_logical (x, last) return gen_rtx_combine (reverse_condition (GET_CODE (op0)), mode, XEXP (op0, 0), XEXP (op0, 1)); break; + default: + break; } return x; @@ -5307,6 +5319,8 @@ extract_left_shift (x, count) GEN_INT (INTVAL (XEXP (x, 1)) >> count)); break; + default: + break; } return 0; @@ -5548,6 +5562,8 @@ make_compound_operation (x, in_code) return newer; } + default: + break; } if (new) @@ -6074,6 +6090,8 @@ force_to_mode (x, mode, mask, reg, just_select) force_to_mode (XEXP (x, 2), mode, mask, reg,next_select))); break; + default: + break; } /* Ensure we return a value of the proper mode. */ @@ -6288,6 +6306,8 @@ known_cond (x, cond, reg, val) case LT: case LE: return gen_unary (NEG, GET_MODE (XEXP (x, 0)), GET_MODE (XEXP (x, 0)), XEXP (x, 0)); + default: + break; } /* The only other cases we handle are MIN, MAX, and comparisons if the @@ -6324,6 +6344,8 @@ known_cond (x, cond, reg, val) return unsignedp ? XEXP (x, 1) : x; case LEU: case LTU: return unsignedp ? XEXP (x, 0) : x; + default: + break; } } } @@ -6935,6 +6957,8 @@ nonzero_bits (x, mode) result_width = MIN (width0, width1); result_low = MIN (low0, low1); break; + default: + break; } if (result_width < mode_width) @@ -7037,6 +7061,8 @@ nonzero_bits (x, mode) nonzero &= (nonzero_bits (XEXP (x, 1), mode) | nonzero_bits (XEXP (x, 2), mode)); break; + default: + break; } return nonzero; @@ -7306,6 +7332,8 @@ num_sign_bit_copies (x, mode) case GEU: case GTU: case LEU: case LTU: return bitwidth; #endif + default: + break; } /* If we haven't been able to figure it out by one of the above rules, @@ -7416,6 +7444,8 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p) case NEG: op0 = NIL; break; + default: + break; } } @@ -7457,6 +7487,8 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p) /* (a ^ b) & b) == (~a) & b */ *pcomp_p = 1; break; + default: + break; } /* Check for NO-OP cases. */ @@ -8073,6 +8105,8 @@ simplify_shift_const (x, code, result_mode, varop, count) continue; } break; + default: + break; } break; @@ -8864,6 +8898,8 @@ simplify_comparison (code, pop0, pop1) code = LT; } break; + default: + break; } /* Compute some predicates to simplify code below. */ @@ -9397,6 +9433,8 @@ simplify_comparison (code, pop0, pop1) continue; } break; + default: + break; } break; @@ -9527,6 +9565,8 @@ reversible_comparison_p (x) x = get_last_value (XEXP (x, 0)); return (x && GET_CODE (x) == COMPARE && ! FLOAT_MODE_P (GET_MODE (XEXP (x, 0)))); + default: + break; } return 0; @@ -10107,6 +10147,8 @@ mark_used_regs_combine (x) mark_used_regs_combine (SET_SRC (x)); return; } + default: + break; } /* Recursively scan the operands of this expression. */ diff --git a/gnu/usr.bin/cc/cc_int/convert.c b/gnu/usr.bin/cc/cc_int/convert.c index 900f9c5..ca40eef 100644 --- a/gnu/usr.bin/cc/cc_int/convert.c +++ b/gnu/usr.bin/cc/cc_int/convert.c @@ -386,6 +386,8 @@ convert_to_integer (type, expr) } } + default: + break; } return build1 (NOP_EXPR, type, expr); diff --git a/gnu/usr.bin/cc/cc_int/cse.c b/gnu/usr.bin/cc/cc_int/cse.c index 89643e0..db7dbe7 100644 --- a/gnu/usr.bin/cc/cc_int/cse.c +++ b/gnu/usr.bin/cc/cc_int/cse.c @@ -21,6 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" /* Must precede rtl.h for FFS. */ #include <stdio.h> +#include <string.h> #include "rtl.h" #include "regs.h" @@ -737,6 +738,8 @@ rtx_cost (x, outer_code) RTX_COSTS (x, code, outer_code); #endif CONST_COSTS (x, code, outer_code); + default: + break; } /* Sum the costs of the sub-rtx's, plus cost of this operation, @@ -1948,6 +1951,8 @@ canon_hash (x, mode) do_not_record = 1; return 0; } + default: + break; } i = GET_RTX_LENGTH (code) - 1; @@ -2122,6 +2127,8 @@ exp_equiv_p (x, y, validate, equal_values) validate, equal_values) && exp_equiv_p (XEXP (x, 1), XEXP (y, 0), validate, equal_values))); + default: + break; } /* Compare the elements. If any pair of corresponding elements @@ -2318,6 +2325,8 @@ set_nonvarying_address_components (addr, size, pbase, pstart, pend) base = *pbase; } break; + default: + break; } break; @@ -2496,6 +2505,8 @@ canon_reg (x, insn) : REGNO_REG_CLASS (first) == NO_REGS ? x : gen_rtx (REG, qty_mode[reg_qty[REGNO (x)]], first)); } + default: + break; } fmt = GET_RTX_FORMAT (code); @@ -3289,6 +3300,8 @@ simplify_unary_operation (code, mode, op, op_mode) && GET_CODE (XEXP (XEXP (op, 0), 1)) == LABEL_REF) return XEXP (op, 0); break; + default: + break; } return 0; @@ -4189,6 +4202,8 @@ simplify_plus_minus (code, mode, op0, op1) if (negs[i]) ops[i] = GEN_INT (- INTVAL (ops[i])), negs[i] = 0, changed = 1; break; + default: + break; } } @@ -4518,6 +4533,8 @@ simplify_relational_operation (code, mode, op0, op1) && INTEGRAL_MODE_P (mode)) return const0_rtx; break; + default: + break; } return 0; @@ -4547,6 +4564,8 @@ simplify_relational_operation (code, mode, op0, op1) return equal || op0ltu ? const_true_rtx : const0_rtx; case GEU: return equal || op1ltu ? const_true_rtx : const0_rtx; + default: + break; } abort (); @@ -5012,6 +5031,8 @@ fold_rtx (x, insn) return x; } + default: + break; } const_arg0 = 0; @@ -5345,6 +5366,8 @@ fold_rtx (x, insn) if (has_sign) return false; break; + default: + break; } } } @@ -5534,6 +5557,8 @@ fold_rtx (x, insn) return cse_gen_binary (code, mode, y, new_const); } + default: + break; } new = simplify_binary_operation (code, mode, @@ -7568,6 +7593,8 @@ cse_process_notes (x, object) /* Otherwise, canonicalize this register. */ return canon_reg (x, NULL_RTX); + default: + break; } for (i = 0; i < GET_RTX_LENGTH (code); i++) @@ -8510,6 +8537,8 @@ count_reg_usage (x, counts, dest, incr) count_reg_usage (XEXP (x, 0), counts, NULL_RTX, incr); count_reg_usage (XEXP (x, 1), counts, NULL_RTX, incr); return; + default: + break; } fmt = GET_RTX_FORMAT (code); diff --git a/gnu/usr.bin/cc/cc_int/dbxout.c b/gnu/usr.bin/cc/cc_int/dbxout.c index 86f614c..b9ee5f8 100644 --- a/gnu/usr.bin/cc/cc_int/dbxout.c +++ b/gnu/usr.bin/cc/cc_int/dbxout.c @@ -68,6 +68,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Include these first, because they may define MIN and MAX. */ #include <stdio.h> +#include <string.h> #include <errno.h> #include "config.h" @@ -1768,6 +1769,8 @@ dbxout_symbol (decl, local) #endif dbxout_symbol_location (decl, type, 0, DECL_RTL (decl)); + default: + break; } } diff --git a/gnu/usr.bin/cc/cc_int/emit-rtl.c b/gnu/usr.bin/cc/cc_int/emit-rtl.c index 9de163c..02c35d4 100644 --- a/gnu/usr.bin/cc/cc_int/emit-rtl.c +++ b/gnu/usr.bin/cc/cc_int/emit-rtl.c @@ -1514,6 +1514,8 @@ copy_rtx_if_shared (orig) x->used = 1; return x; } + default: + break; } /* This rtx may not be shared. If it has already been seen, @@ -1603,6 +1605,8 @@ reset_used_flags (x) case BARRIER: /* The chain of insns is not being copied. */ return; + default: + break; } x->used = 0; @@ -3089,6 +3093,8 @@ restore_reg_data (first) case INSN: restore_reg_data_1 (PATTERN (insn)); break; + default: + break; } } @@ -3166,6 +3172,8 @@ restore_reg_data_1 (orig) mark_reg_pointer (XEXP (x, 0)); restore_reg_data_1 (XEXP (x, 0)); return; + default: + break; } /* Now scan the subexpressions recursively. */ diff --git a/gnu/usr.bin/cc/cc_int/explow.c b/gnu/usr.bin/cc/cc_int/explow.c index f32c5ad..ed8102c 100644 --- a/gnu/usr.bin/cc/cc_int/explow.c +++ b/gnu/usr.bin/cc/cc_int/explow.c @@ -116,6 +116,8 @@ plus_constant_wide (x, c) return gen_rtx (PLUS, mode, XEXP (x, 0), plus_constant (XEXP (x, 1), c)); + default: + break; } if (c != 0) @@ -669,6 +671,8 @@ promote_mode (type, mode, punsignedp, for_call) case POINTER_TYPE: break; + default: + break; } *punsignedp = unsignedp; @@ -807,6 +811,8 @@ emit_stack_save (save_level, psave, after) } break; #endif + default: + break; } /* If there is no save area and we have to allocate one, do so. Otherwise @@ -887,6 +893,8 @@ emit_stack_restore (save_level, sa, after) fcn = gen_restore_stack_nonlocal; break; #endif + default: + break; } if (sa != 0) diff --git a/gnu/usr.bin/cc/cc_int/expmed.c b/gnu/usr.bin/cc/cc_int/expmed.c index 1b20377..995619e 100644 --- a/gnu/usr.bin/cc/cc_int/expmed.c +++ b/gnu/usr.bin/cc/cc_int/expmed.c @@ -3471,6 +3471,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) emit_label (label); } return gen_lowpart (mode, rem_flag ? remainder : quotient); + default: + break; } if (quotient == 0) @@ -3774,6 +3776,8 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep) if (op1 == const1_rtx) op1 = const0_rtx, code = EQ; break; + default: + break; } /* From now on, we won't change CODE, so set ICODE now. */ diff --git a/gnu/usr.bin/cc/cc_int/expr.c b/gnu/usr.bin/cc/cc_int/expr.c index 70678c5..ca2e53e 100644 --- a/gnu/usr.bin/cc/cc_int/expr.c +++ b/gnu/usr.bin/cc/cc_int/expr.c @@ -40,6 +40,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "bc-optab.h" #include "bc-emit.h" +#include <string.h> #define CEIL(x,y) (((x) + (y) - 1) / (y)) @@ -509,6 +510,8 @@ queued_subexp_p (x) case MINUS: return queued_subexp_p (XEXP (x, 0)) || queued_subexp_p (XEXP (x, 1)); + default: + break; } return 0; } @@ -519,7 +522,7 @@ void emit_queue () { register rtx p; - while (p = pending_chain) + while ( (p = pending_chain) ) { QUEUED_INSN (p) = emit_insn (QUEUED_BODY (p)); pending_chain = QUEUED_NEXT (p); @@ -816,6 +819,9 @@ convert_move (to, from, unsignedp) case TFmode: libcall = extendsftf2_libfunc; break; + + default: + break; } break; @@ -833,6 +839,8 @@ convert_move (to, from, unsignedp) case TFmode: libcall = extenddftf2_libfunc; break; + default: + break; } break; @@ -846,6 +854,8 @@ convert_move (to, from, unsignedp) case DFmode: libcall = truncxfdf2_libfunc; break; + default: + break; } break; @@ -859,8 +869,12 @@ convert_move (to, from, unsignedp) case DFmode: libcall = trunctfdf2_libfunc; break; + default: + break; } break; + default: + break; } if (libcall == (rtx) 0) @@ -3708,6 +3722,8 @@ safe_from_p (x, exp) case METHOD_CALL_EXPR: /* This takes a rtx argument, but shouldn't appear here. */ abort (); + default: + break; } /* If we have an rtx, we do not need to scan our operands. */ @@ -4693,15 +4709,15 @@ expand_expr (exp, target, tmode, modifier) /* If domain is empty, answer is no. Likewise if index is constant and out of bounds. */ - if ((TREE_CODE (set_high_bound) == INTEGER_CST - && TREE_CODE (set_low_bound) == INTEGER_CST - && tree_int_cst_lt (set_high_bound, set_low_bound) - || (TREE_CODE (index) == INTEGER_CST - && TREE_CODE (set_low_bound) == INTEGER_CST - && tree_int_cst_lt (index, set_low_bound)) - || (TREE_CODE (set_high_bound) == INTEGER_CST - && TREE_CODE (index) == INTEGER_CST - && tree_int_cst_lt (set_high_bound, index)))) + if (((TREE_CODE (set_high_bound) == INTEGER_CST + && TREE_CODE (set_low_bound) == INTEGER_CST + && tree_int_cst_lt (set_high_bound, set_low_bound)) + || (TREE_CODE (index) == INTEGER_CST + && TREE_CODE (set_low_bound) == INTEGER_CST + && tree_int_cst_lt (index, set_low_bound)) + || (TREE_CODE (set_high_bound) == INTEGER_CST + && TREE_CODE (index) == INTEGER_CST + && tree_int_cst_lt (set_high_bound, index)))) return const0_rtx; if (target == 0) @@ -6618,6 +6634,8 @@ bc_expand_expr (exp) return; } + default: + break; } abort (); @@ -8362,6 +8380,8 @@ preexpand_calls (exp) case SAVE_EXPR: if (SAVE_EXPR_RTL (exp) != 0) return; + default: + break; } nops = tree_code_length[(int) TREE_CODE (exp)]; @@ -9899,7 +9919,7 @@ bc_expand_component_address (exp) if (DECL_BIT_FIELD (TREE_OPERAND (exp, 1))) bc_push_offset_and_size (bitpos, /* DECL_SIZE_UNIT */ (TREE_OPERAND (exp, 1))); else - if (SIval = bitpos / BITS_PER_UNIT) + if ( (SIval = bitpos / BITS_PER_UNIT) ) bc_emit_instruction (addconstPSI, SIval); return (TREE_OPERAND (exp, 1)); diff --git a/gnu/usr.bin/cc/cc_int/final.c b/gnu/usr.bin/cc/cc_int/final.c index 0bfc892..0e16914 100644 --- a/gnu/usr.bin/cc/cc_int/final.c +++ b/gnu/usr.bin/cc/cc_int/final.c @@ -50,6 +50,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <varargs.h> #endif #include <stdio.h> +#include <stdlib.h> #include <ctype.h> #include "tree.h" @@ -1867,6 +1868,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) else if (result == 2) INSN_CODE (insn) = -1; } + default: + break; } } #endif @@ -2120,6 +2123,8 @@ walk_alter_subreg (x) case SUBREG: return alter_subreg (x); + default: + break; } return x; @@ -2178,6 +2183,8 @@ alter_cond (cond) PUT_CODE (cond, NE); value = 2; break; + default: + break; } if (cc_status.flags & CC_NOT_NEGATIVE) @@ -2204,6 +2211,8 @@ alter_cond (cond) PUT_CODE (cond, NE); value = 2; break; + default: + break; } if (cc_status.flags & CC_NO_OVERFLOW) @@ -2226,6 +2235,8 @@ alter_cond (cond) case LTU: /* Jump becomes no-op. */ return -1; + default: + break; } if (cc_status.flags & (CC_Z_IN_NOT_N | CC_Z_IN_N)) @@ -2250,6 +2261,8 @@ alter_cond (cond) PUT_CODE (cond, cc_status.flags & CC_Z_IN_N ? LT : GE); value = 2; break; + default: + break; } if (cc_status.flags & CC_NOT_SIGNED) @@ -2276,6 +2289,8 @@ alter_cond (cond) PUT_CODE (cond, GEU); value = 2; break; + default: + break; } return value; diff --git a/gnu/usr.bin/cc/cc_int/flow.c b/gnu/usr.bin/cc/cc_int/flow.c index 09067de..eb09fa6 100644 --- a/gnu/usr.bin/cc/cc_int/flow.c +++ b/gnu/usr.bin/cc/cc_int/flow.c @@ -108,6 +108,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ reg_n_calls_crosses and reg_basic_block. */ #include <stdio.h> +#include <string.h> #include "config.h" #include "rtl.h" #include "basic-block.h" @@ -2543,6 +2544,8 @@ mark_used_regs (needed, live, x, final, insn) live[i / REGSET_ELT_BITS] |= (REGSET_ELT_TYPE) 1 << (i % REGSET_ELT_BITS); break; + default: + break; } /* Recursively scan the operands of this expression. */ diff --git a/gnu/usr.bin/cc/cc_int/fold-const.c b/gnu/usr.bin/cc/cc_int/fold-const.c index 10093f5..d19297a 100644 --- a/gnu/usr.bin/cc/cc_int/fold-const.c +++ b/gnu/usr.bin/cc/cc_int/fold-const.c @@ -1740,6 +1740,8 @@ operand_equal_p (arg0, arg1, only_const) TREE_OPERAND (arg1, 1), 0) && operand_equal_p (TREE_OPERAND (arg0, 2), TREE_OPERAND (arg1, 2), 0)); + default: + break; } break; } @@ -1951,6 +1953,8 @@ eval_subst (arg, old0, new0, old1, new1) old0, new0, old1, new1), eval_subst (TREE_OPERAND (arg, 2), old0, new0, old1, new1))); + default: + break; } case '<': @@ -2094,6 +2098,8 @@ invert_truthvalue (arg) case SAVE_EXPR: return build1 (TRUTH_NOT_EXPR, type, arg); + default: + break; } if (TREE_CODE (TREE_TYPE (arg)) != BOOLEAN_TYPE) abort (); @@ -4285,6 +4291,8 @@ fold (expr) TREE_SET_CODE (t, code); arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0); TREE_OPERAND (t, 1) = arg1; + default: + break; } } @@ -4411,6 +4419,8 @@ fold (expr) t = build_int_2 (0, 0); TREE_TYPE (t) = type; return t; + default: + break; } } @@ -4438,6 +4448,8 @@ fold (expr) return omit_one_operand (type, convert (type, integer_zero_node), arg0); + default: + break; } } @@ -4732,6 +4744,8 @@ fold (expr) return pedantic_non_lvalue (fold (build1 (NEGATE_EXPR, type, fold (build1 (ABS_EXPR, type, arg1))))); + default: + break; } /* If this is A != 0 ? A : 0, this is simply A. For ==, it is @@ -4764,6 +4778,8 @@ fold (expr) case GT_EXPR: return pedantic_non_lvalue (fold (build (MAX_EXPR, type, arg1, arg2))); + default: + break; } /* If this is A op C1 ? A : C2 with C1 and C2 constant integers, @@ -4822,6 +4838,8 @@ fold (expr) return pedantic_non_lvalue (fold (build (MAX_EXPR, type, arg1, arg2))); break; + default: + break; } } diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index a1205fd..3a9dfeb 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)ld.c 6.10 (Berkeley) 5/22/91"; Set, indirect, and warning symbol features added by Randy Smith. */ /* - * $Id: ld.c,v 1.33 1996/05/28 16:17:48 phk Exp $ + * $Id: ld.c,v 1.34 1996/06/08 04:52:57 wpaul Exp $ */ /* Define how to initialize system-dependent header fields. */ @@ -875,10 +875,10 @@ check_each_file(function, arg) for (; subentry; subentry = subentry->chain) { if (subentry->flags & E_SCRAPPED) continue; - if (return_val = (*function)(subentry, arg)) + if ( (return_val = (*function)(subentry, arg)) ) return return_val; } - } else if (return_val = (*function)(entry, arg)) + } else if ( (return_val = (*function)(entry, arg)) ) return return_val; } return 0; @@ -2391,7 +2391,7 @@ digest_pass2() /* Flag second-hand definitions */ undefined_global_sym_count++; if (sp->flags & GS_TRACE) - printf("symbol %s assigned to location %#x\n", + printf("symbol %s assigned to location %#lx\n", sp->name, sp->value); } @@ -2456,7 +2456,7 @@ digest_pass2() } bss_size += size; if (write_map) - printf("Allocating %s %s: %x at %x\n", + printf("Allocating %s %s: %x at %lx\n", sp->defined==(N_BSS|N_EXT)?"common":"data", sp->name, size, sp->value); @@ -3607,7 +3607,8 @@ write_file_syms(entry, syms_written_addr) continue; if (discard_locals == DISCARD_ALL || - discard_locals == DISCARD_L && lsp->flags & LS_L_SYMBOL) { + (discard_locals == DISCARD_L && + (lsp->flags & LS_L_SYMBOL))) { /* * The user wants to discard this symbol, but it * is referenced by a relocation. We can still diff --git a/gnu/usr.bin/ld/ldconfig/ldconfig.c b/gnu/usr.bin/ld/ldconfig/ldconfig.c index 13cd297..6eb49e0 100644 --- a/gnu/usr.bin/ld/ldconfig/ldconfig.c +++ b/gnu/usr.bin/ld/ldconfig/ldconfig.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ldconfig.c,v 1.13 1996/01/09 00:04:35 pk Exp $ + * $Id: ldconfig.c,v 1.12 1996/02/26 02:22:33 pst Exp $ */ #include <sys/param.h> @@ -39,6 +39,8 @@ #include <sys/resource.h> #include <dirent.h> #include <errno.h> +#include <err.h> +#include <ctype.h> #include <fcntl.h> #include <ar.h> #include <ranlib.h> @@ -114,7 +116,7 @@ char *argv[]; return rval; if (justread) { listhints(); - return; + return 0; } } @@ -288,7 +290,7 @@ buildhints() hdr.hh_ehints = hdr.hh_strtab + hdr.hh_strtab_sz; if (verbose) - printf("Totals: entries %d, buckets %d, string size %d\n", + printf("Totals: entries %d, buckets %ld, string size %d\n", nhints, hdr.hh_nbucket, strtab_sz); /* Allocate buckets and string table */ diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c index 5e119ba..550dedf 100644 --- a/gnu/usr.bin/ld/lib.c +++ b/gnu/usr.bin/ld/lib.c @@ -1,5 +1,5 @@ /* - * $Id: lib.c,v 1.15 1995/05/30 05:01:46 rgrimes Exp $ - library routines + * $Id: lib.c,v 1.16 1995/09/28 19:43:22 bde Exp $ - library routines */ #include <sys/param.h> @@ -841,7 +841,7 @@ struct file_entry *p; dot_a: p->flags &= ~E_SEARCH_DYNAMIC; - if (cp = strrchr(p->filename, '/')) { + if ( (cp = strrchr(p->filename, '/')) ) { *cp++ = '\0'; fname = concat(concat(p->filename, "/lib", cp), ".a", ""); *(--cp) = '/'; diff --git a/gnu/usr.bin/ld/rrs.c b/gnu/usr.bin/ld/rrs.c index 602bccf..d218b9c 100644 --- a/gnu/usr.bin/ld/rrs.c +++ b/gnu/usr.bin/ld/rrs.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rrs.c,v 1.14 1995/03/04 17:46:09 nate Exp $ + * $Id: rrs.c,v 1.15 1996/05/27 18:06:02 jdp Exp $ */ #include <sys/param.h> @@ -74,7 +74,6 @@ static int rrs_symbol_size; static int current_jmpslot_offset; static int current_got_offset; static int got_origin; -static int current_reloc_offset; static int current_hash_index; int number_of_shobjs; @@ -662,9 +661,10 @@ void consider_rrs_section_lengths() { int n; - struct shobj *shp, **shpp; + struct shobj *shp; #ifdef notyet + struct shobj **shpp; /* We run into trouble with this as long as shared object symbols are not checked for definitions */ /* diff --git a/gnu/usr.bin/ld/rtld/malloc.c b/gnu/usr.bin/ld/rtld/malloc.c index 60e6ec3..5d1d0a4 100644 --- a/gnu/usr.bin/ld/rtld/malloc.c +++ b/gnu/usr.bin/ld/rtld/malloc.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)malloc.c 5.11 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id: malloc.c,v 1.3 1995/03/04 17:46:24 nate Exp $"; +static char *rcsid = "$Id: malloc.c,v 1.4 1995/05/30 05:01:48 rgrimes Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -66,6 +66,7 @@ static char *rcsid = "$Id: malloc.c,v 1.3 1995/03/04 17:46:24 nate Exp $"; #define NULL 0 +extern void xprintf __P((char *, ...)); static void morecore(); static int findbucket(); @@ -390,7 +391,7 @@ realloc(cp, nbytes) * header starts at ``freep''. If srchlen is -1 search the whole list. * Return bucket number, or -1 if not found. */ -static +static int findbucket(freep, srchlen) union overhead *freep; int srchlen; diff --git a/gnu/usr.bin/ld/warnings.c b/gnu/usr.bin/ld/warnings.c index 3c65a22..b4f0b3e 100644 --- a/gnu/usr.bin/ld/warnings.c +++ b/gnu/usr.bin/ld/warnings.c @@ -1,5 +1,5 @@ /* - * $Id: warnings.c,v 1.9 1994/12/23 22:30:57 nate Exp $ + * $Id: warnings.c,v 1.10 1995/03/04 17:46:10 nate Exp $ */ #include <sys/param.h> @@ -113,7 +113,7 @@ print_symbols(outfile) else if (sp->defined == (N_UNDF|N_EXT)) fprintf(outfile, "common: size %#x", sp->common_size); else - fprintf(outfile, "type %d, value %#x, size %#x", + fprintf(outfile, "type %d, value %#lx, size %#x", sp->defined, sp->value, sp->size); if (sp->alias) fprintf(outfile, ", aliased to %s", sp->alias->name); @@ -133,7 +133,7 @@ describe_file_sections(entry, outfile) if (entry->flags & (E_JUST_SYMS | E_DYNAMIC)) fprintf(outfile, " symbols only\n"); else - fprintf(outfile, " text %x(%x), data %x(%x), bss %x(%x) hex\n", + fprintf(outfile, " text %x(%lx), data %x(%lx), bss %x(%lx) hex\n", entry->text_start_address, entry->header.a_text, entry->data_start_address, entry->header.a_data, entry->bss_start_address, entry->header.a_bss); @@ -161,7 +161,7 @@ list_file_locals (entry, outfile) * update it if necessary by this file's start address. */ if (!(p->n_type & (N_STAB | N_EXT))) - fprintf(outfile, " %s: 0x%x\n", + fprintf(outfile, " %s: 0x%lx\n", entry->strings + p->n_un.n_strx, p->n_value); } |