summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gnu/lib/libg++/libg++/bitblt.c4
-rw-r--r--gnu/lib/libg++/libg++/bitlcomp.c2
-rw-r--r--gnu/lib/libg++/libio/filedoalloc.c1
-rw-r--r--gnu/lib/libg++/libio/ioprims.c2
-rw-r--r--gnu/usr.bin/cc/cc_int/bc-emit.c4
-rw-r--r--gnu/usr.bin/cc/cc_int/c-common.c12
-rw-r--r--gnu/usr.bin/cc/cc_int/calls.c3
-rw-r--r--gnu/usr.bin/cc/cc_int/combine.c42
-rw-r--r--gnu/usr.bin/cc/cc_int/convert.c2
-rw-r--r--gnu/usr.bin/cc/cc_int/cse.c29
-rw-r--r--gnu/usr.bin/cc/cc_int/dbxout.c3
-rw-r--r--gnu/usr.bin/cc/cc_int/emit-rtl.c8
-rw-r--r--gnu/usr.bin/cc/cc_int/explow.c8
-rw-r--r--gnu/usr.bin/cc/cc_int/expmed.c4
-rw-r--r--gnu/usr.bin/cc/cc_int/expr.c42
-rw-r--r--gnu/usr.bin/cc/cc_int/final.c15
-rw-r--r--gnu/usr.bin/cc/cc_int/flow.c3
-rw-r--r--gnu/usr.bin/cc/cc_int/fold-const.c18
-rw-r--r--gnu/usr.bin/ld/ld.c13
-rw-r--r--gnu/usr.bin/ld/ldconfig/ldconfig.c8
-rw-r--r--gnu/usr.bin/ld/lib.c4
-rw-r--r--gnu/usr.bin/ld/rrs.c6
-rw-r--r--gnu/usr.bin/ld/rtld/malloc.c5
-rw-r--r--gnu/usr.bin/ld/warnings.c8
-rw-r--r--sbin/ldconfig/ldconfig.c8
-rw-r--r--usr.bin/ar/append.c2
-rw-r--r--usr.bin/ar/archive.c2
-rw-r--r--usr.bin/ar/misc.c2
-rw-r--r--usr.bin/ar/replace.c2
-rw-r--r--usr.bin/compile_et/compile_et.c13
-rw-r--r--usr.bin/compile_et/error_table.y8
-rw-r--r--usr.bin/compile_et/et_lex.lex.l4
-rw-r--r--usr.bin/gcore/aoutcore.c3
-rw-r--r--usr.bin/gcore/gcore.c3
-rw-r--r--usr.bin/make/arch.c2
-rw-r--r--usr.bin/mk_cmds/cmd_tbl.l14
-rw-r--r--usr.bin/mk_cmds/mk_cmds.c3
-rw-r--r--usr.bin/nm/nm.c18
-rw-r--r--usr.bin/ranlib/build.c10
-rw-r--r--usr.bin/ranlib/misc.c10
-rw-r--r--usr.bin/ranlib/ranlib.c11
-rw-r--r--usr.bin/ranlib/touch.c8
-rw-r--r--usr.bin/rpcgen/rpc_clntout.c11
-rw-r--r--usr.bin/rpcgen/rpc_cout.c68
-rw-r--r--usr.bin/rpcgen/rpc_hout.c54
-rw-r--r--usr.bin/rpcgen/rpc_main.c79
-rw-r--r--usr.bin/rpcgen/rpc_parse.c49
-rw-r--r--usr.bin/rpcgen/rpc_sample.c13
-rw-r--r--usr.bin/rpcgen/rpc_scan.c36
-rw-r--r--usr.bin/rpcgen/rpc_svcout.c62
-rw-r--r--usr.bin/rpcgen/rpc_tblout.c9
-rw-r--r--usr.bin/rpcgen/rpc_util.c23
-rw-r--r--usr.bin/rpcgen/rpc_util.h4
-rw-r--r--usr.bin/xlint/lint1/decl.c1
-rw-r--r--usr.bin/xlint/lint1/scan.l2
-rw-r--r--usr.bin/xlint/lint1/tree.c4
-rw-r--r--usr.bin/xlint/lint2/read.c2
-rw-r--r--usr.bin/xlint/xlint/xlint.c1
58 files changed, 530 insertions, 257 deletions
diff --git a/gnu/lib/libg++/libg++/bitblt.c b/gnu/lib/libg++/libg++/bitblt.c
index f7c4322..a1cc71b 100644
--- a/gnu/lib/libg++/libg++/bitblt.c
+++ b/gnu/lib/libg++/libg++/bitblt.c
@@ -68,7 +68,7 @@ _BS_blt (op, pdst, dstbit, psrc, srcbit, length)
case _BS_alu_nor:
ca1 = ONES; cx1 = ONES; ca2 = ONES; cx2 = ONES;
break;
- case_BS_alu_equiv:
+ case _BS_alu_equiv:
ca1 = 0; cx1 = ONES; ca2 = ONES; cx2 = ONES;
break;
case _BS_alu_invert:
@@ -91,7 +91,7 @@ _BS_blt (op, pdst, dstbit, psrc, srcbit, length)
return;
}
{
-#define COMBINE(dst, src) ((dst) & ((src) & ca1 ^ cx1) ^ ((src) & ca2 ^ cx2))
+#define COMBINE(dst, src) ( ((dst) & ( ((src) & ca1) ^ cx1)) ^ ( ((src) & ca2) ^ cx2))
#include "bitdo2.h"
}
}
diff --git a/gnu/lib/libg++/libg++/bitlcomp.c b/gnu/lib/libg++/libg++/bitlcomp.c
index edf154c..9f0c0e0 100644
--- a/gnu/lib/libg++/libg++/bitlcomp.c
+++ b/gnu/lib/libg++/libg++/bitlcomp.c
@@ -67,7 +67,7 @@ _BS_lcompare_0 (ptr0, len0, ptr1, len1)
len0 -= nwords0 * _BS_BITS_PER_WORD;
len1 -= nwords1 * _BS_BITS_PER_WORD;
if (len0 == 0 || len1 == 0)
- return len0 == 0 - len1 == 0;
+ return (len0 == 0) - (len1 == 0);
len0 &= _BS_BITS_PER_WORD - 1;
len1 &= _BS_BITS_PER_WORD - 1;
word0 = *ptr0++ & ~((_BS_word)(~0) _BS_RIGHT len0);
diff --git a/gnu/lib/libg++/libio/filedoalloc.c b/gnu/lib/libg++/libio/filedoalloc.c
index 92c5105..ac96d19 100644
--- a/gnu/lib/libg++/libio/filedoalloc.c
+++ b/gnu/lib/libg++/libio/filedoalloc.c
@@ -45,6 +45,7 @@ the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#include <sys/types.h>
#include <sys/stat.h>
+#include <unistd.h>
#ifdef __STDC__
#include <stdlib.h>
#endif
diff --git a/gnu/lib/libg++/libio/ioprims.c b/gnu/lib/libg++/libio/ioprims.c
index 8164ba3..cf9cf93 100644
--- a/gnu/lib/libg++/libio/ioprims.c
+++ b/gnu/lib/libg++/libio/ioprims.c
@@ -31,6 +31,8 @@ the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/uio.h>
+#include <unistd.h>
#ifdef TODO
/* Add open, isatty */
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);
}
diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c
index 13cd297..6eb49e0 100644
--- a/sbin/ldconfig/ldconfig.c
+++ b/sbin/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/usr.bin/ar/append.c b/usr.bin/ar/append.c
index 9bbe473..ea2e04c 100644
--- a/usr.bin/ar/append.c
+++ b/usr.bin/ar/append.c
@@ -71,7 +71,7 @@ append(argv)
/* Read from disk, write to an archive; pad on write. */
SETCF(0, 0, afd, archive, WPAD);
- for (eval = 0; file = *argv++;) {
+ for (eval = 0; (file = *argv++); ) {
if ((fd = open(file, O_RDONLY)) < 0) {
warn("%s", file);
eval = 1;
diff --git a/usr.bin/ar/archive.c b/usr.bin/ar/archive.c
index 021e131..d804b97 100644
--- a/usr.bin/ar/archive.c
+++ b/usr.bin/ar/archive.c
@@ -320,7 +320,7 @@ skip_arobj(fd)
{
off_t len;
- len = chdr.size + (chdr.size + chdr.lname & 1);
+ len = chdr.size + ( (chdr.size + chdr.lname) & 1);
if (lseek(fd, len, SEEK_CUR) == (off_t)-1)
error(archive);
}
diff --git a/usr.bin/ar/misc.c b/usr.bin/ar/misc.c
index 5fef8d6..bcd9711 100644
--- a/usr.bin/ar/misc.c
+++ b/usr.bin/ar/misc.c
@@ -97,7 +97,7 @@ files(argv)
for (list = argv; *list; ++list)
if (compare(*list)) {
p = *list;
- for (; list[0] = list[1]; ++list)
+ for (; (list[0] = list[1]); ++list)
continue;
return (p);
}
diff --git a/usr.bin/ar/replace.c b/usr.bin/ar/replace.c
index a226235..b9a6cc6 100644
--- a/usr.bin/ar/replace.c
+++ b/usr.bin/ar/replace.c
@@ -141,7 +141,7 @@ useold: SETCF(afd, archive, curfd, tname, RPAD|WPAD);
}
/* Append any left-over arguments to the end of the after file. */
-append: while (file = *argv++) {
+append: while ( (file = *argv++) ) {
if (options & AR_V)
(void)printf("a - %s\n", file);
if ((sfd = open(file, O_RDONLY)) < 0) {
diff --git a/usr.bin/compile_et/compile_et.c b/usr.bin/compile_et/compile_et.c
index 8e3f492..fcedb8f 100644
--- a/usr.bin/compile_et/compile_et.c
+++ b/usr.bin/compile_et/compile_et.c
@@ -8,6 +8,8 @@
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
#include <sys/file.h>
#include <string.h>
#include <sys/param.h>
@@ -23,7 +25,7 @@ static const char copyright[] =
"Copyright 1987,1988 by MIT Student Information Processing Board";
static const char rcsid_compile_et_c[] =
- "$Header: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.lib/et/RCS/compile_et.c,v 1.3 91/02/28 15:15:23 epeisach Exp $";
+ "$Header: /home/ncvs/src/usr.bin/compile_et/compile_et.c,v 1.2 1995/01/14 22:29:31 wollman Exp $";
#endif
extern char *gensym();
@@ -33,10 +35,6 @@ char buffer[BUFSIZ];
char *table_name = (char *)NULL;
FILE *hfile, *cfile;
-/* C library */
-extern char *malloc();
-extern int errno;
-
/* lex stuff */
extern FILE *yyin;
extern int yylineno;
@@ -253,7 +251,7 @@ int main (argc, argv) int argc; char **argv; {
for (cpp = struct_def; *cpp; cpp++)
fputs (*cpp, cfile);
fprintf(cfile,
- "static const struct error_table et = { text, %ldL, %d };\n\n",
+ "static const struct error_table et = { text, %dL, %d };\n\n",
table_number, current);
fputs("static struct et_list link = { 0, 0 };\n\n",
cfile);
@@ -269,7 +267,7 @@ int main (argc, argv) int argc; char **argv; {
fprintf (hfile, "extern void initialize_%s_error_table ();\n",
table_name);
- fprintf (hfile, "#define ERROR_TABLE_BASE_%s (%ldL)\n",
+ fprintf (hfile, "#define ERROR_TABLE_BASE_%s (%dL)\n",
table_name, table_number);
/* compatibility... */
fprintf (hfile, "\n/* for compatibility with older versions... */\n");
@@ -286,5 +284,6 @@ int yyerror(s) char *s; {
fputs(s, stderr);
fprintf(stderr, "\nLine number %d; last token was '%s'\n",
yylineno, current_token);
+ return 0;
}
diff --git a/usr.bin/compile_et/error_table.y b/usr.bin/compile_et/error_table.y
index cb3c0da..c29db13 100644
--- a/usr.bin/compile_et/error_table.y
+++ b/usr.bin/compile_et/error_table.y
@@ -1,7 +1,7 @@
%{
#include <stdio.h>
+#include <stdlib.h>
char *str_concat(), *ds(), *quote();
-void *malloc(), *realloc();
char *current_token = (char *)NULL;
extern char *table_name;
%}
@@ -74,7 +74,7 @@ description : QUOTED_STRING
#ifndef lint
static char const rcsid_error_table_y[] =
- "$Header: /home/ncvs/src/usr.bin/compile_et/error_table.y,v 1.2 1995/01/14 22:29:33 wollman Exp $";
+ "$Header: /home/ncvs/src/usr.bin/compile_et/error_table.y,v 1.3 1995/03/15 19:05:28 wpaul Exp $";
#endif
void *malloc(), *realloc();
@@ -124,6 +124,7 @@ long table_number;
int current = 0;
char **error_codes = (char **)NULL;
+void
add_ec(name, description)
char const *name, *description;
{
@@ -138,6 +139,7 @@ add_ec(name, description)
error_codes[current] = (char *)NULL;
}
+void
add_ec_val(name, val, description)
char const *name, *val, *description;
{
@@ -162,6 +164,7 @@ add_ec_val(name, val, description)
error_codes[current] = (char *)NULL;
}
+void
put_ecs()
{
int i;
@@ -206,6 +209,7 @@ int char_to_num(c)
exit (1);
}
+void
set_table_num(string)
char *string;
{
diff --git a/usr.bin/compile_et/et_lex.lex.l b/usr.bin/compile_et/et_lex.lex.l
index 0c848de..48d1b89 100644
--- a/usr.bin/compile_et/et_lex.lex.l
+++ b/usr.bin/compile_et/et_lex.lex.l
@@ -11,7 +11,7 @@ end return END;
[\t\n ] ;
\"{PC}*\" { register char *p; yylval.dynstr = ds(yytext+1);
- if (p=rindex(yylval.dynstr, '"')) *p='\0';
+ if ( (p=rindex(yylval.dynstr, '"')) ) *p='\0';
return QUOTED_STRING;
}
@@ -22,5 +22,5 @@ end return END;
. { return (*yytext); }
%%
#ifndef lint
-static char rcsid_et_lex_lex_l[] = "$Header: et_lex.lex.l,v 1.3 87/10/31 06:28:05 raeburn Exp $";
+static char rcsid_et_lex_lex_l[] = "$Header: /home/ncvs/src/usr.bin/compile_et/et_lex.lex.l,v 1.2 1995/01/14 22:29:33 wollman Exp $";
#endif
diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c
index aba1e21..4ec4ed6 100644
--- a/usr.bin/gcore/aoutcore.c
+++ b/usr.bin/gcore/aoutcore.c
@@ -80,7 +80,8 @@ void userdump __P((int, struct proc *, u_long, int));
kvm_t *kd;
/* XXX undocumented routine, should be in kvm.h? */
-ssize_t kvm_uread __P((kvm_t *, struct proc *, u_long, char *, size_t));
+ssize_t kvm_uread __P((kvm_t *, const struct proc *, u_long, char *, size_t));
+
static int data_offset;
diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c
index aba1e21..4ec4ed6 100644
--- a/usr.bin/gcore/gcore.c
+++ b/usr.bin/gcore/gcore.c
@@ -80,7 +80,8 @@ void userdump __P((int, struct proc *, u_long, int));
kvm_t *kd;
/* XXX undocumented routine, should be in kvm.h? */
-ssize_t kvm_uread __P((kvm_t *, struct proc *, u_long, char *, size_t));
+ssize_t kvm_uread __P((kvm_t *, const struct proc *, u_long, char *, size_t));
+
static int data_offset;
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index d5046e9..a015eab 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -486,7 +486,7 @@ ArchStatMember (archive, member, hash)
strncpy(copy, member, AR_MAX_NAME_LEN);
copy[AR_MAX_NAME_LEN] = '\0';
}
- if (he = Hash_FindEntry (&ar->members, copy))
+ if ( (he = Hash_FindEntry (&ar->members, copy)) )
return ((struct ar_hdr *) Hash_GetValue (he));
return ((struct ar_hdr *) NULL);
}
diff --git a/usr.bin/mk_cmds/cmd_tbl.l b/usr.bin/mk_cmds/cmd_tbl.l
index 15b31c6..0c615ce 100644
--- a/usr.bin/mk_cmds/cmd_tbl.l
+++ b/usr.bin/mk_cmds/cmd_tbl.l
@@ -11,41 +11,41 @@
extern char *last_token, *ds();
-static l_command_table()
+static int l_command_table()
{
last_token = "command_table";
return COMMAND_TABLE;
}
-static l_request()
+static int l_request()
{
last_token = "request";
return REQUEST;
}
-static l_unimplemented()
+static int l_unimplemented()
{
last_token = "unimplemented";
return UNIMPLEMENTED;
}
-static l_end()
+static int l_end()
{
last_token = "end";
return END;
}
-static l_quoted_string()
+static int l_quoted_string()
{
register char *p;
yylval.dynstr = ds(yytext+1);
- if (p=rindex(yylval.dynstr, '"'))
+ if ( (p=rindex(yylval.dynstr, '"')) )
*p='\0';
last_token = ds(yylval.dynstr);
return STRING;
}
-static l_string()
+static int l_string()
{
yylval.dynstr = ds(yytext);
last_token = ds(yylval.dynstr);
diff --git a/usr.bin/mk_cmds/mk_cmds.c b/usr.bin/mk_cmds/mk_cmds.c
index 8298859..1c3a3fb 100644
--- a/usr.bin/mk_cmds/mk_cmds.c
+++ b/usr.bin/mk_cmds/mk_cmds.c
@@ -26,6 +26,7 @@ extern FILE *output_file;
extern FILE *yyin, *yyout;
extern int yylineno;
+int
main(argc, argv)
int argc;
char **argv;
@@ -85,10 +86,12 @@ main(argc, argv)
return result;
}
+int
yyerror(s)
char *s;
{
fputs(s, stderr);
fprintf(stderr, "\nLine %d; last token was '%s'\n",
yylineno, last_token);
+ return 0;
}
diff --git a/usr.bin/nm/nm.c b/usr.bin/nm/nm.c
index 2dc00c3..e7e7e7d 100644
--- a/usr.bin/nm/nm.c
+++ b/usr.bin/nm/nm.c
@@ -74,12 +74,18 @@ int (*sfunc)() = fname;
#define SYMBOL_TYPE(x) ((x) & (N_TYPE | N_STAB))
void *emalloc();
+void usage __P(( void ));
+int process_file __P(( char * ));
+int show_archive __P(( char *, FILE * ));
+int show_objfile __P(( char *, FILE * ));
+void print_symbol __P(( char *, struct nlist * ));
/*
* main()
* parse command line, execute process_file() for each file
* specified on the command line.
*/
+int
main(argc, argv)
int argc;
char **argv;
@@ -143,6 +149,7 @@ main(argc, argv)
* show symbols in the file given as an argument. Accepts archive and
* object files as input.
*/
+int
process_file(fname)
char *fname;
{
@@ -205,6 +212,7 @@ static char *scat(char *dest, char *src)
* show_archive()
* show symbols in the given archive file
*/
+int
show_archive(fname, fp)
char *fname;
FILE *fp;
@@ -324,6 +332,7 @@ skip: if (fseek(fp, last_ar_off + even(atol(ar_head.ar_size)),
* file pointer for fp is expected to be at the beginning of an a.out
* header.
*/
+int
show_objfile(objname, fp)
char *objname;
FILE *fp;
@@ -457,6 +466,7 @@ show_objfile(objname, fp)
* print_symbol()
* show one symbol
*/
+void
print_symbol(objname, sym)
char *objname;
register struct nlist *sym;
@@ -589,6 +599,7 @@ typeletter(type)
return('?');
}
+int
fname(a0, b0)
void *a0, *b0;
{
@@ -597,6 +608,7 @@ fname(a0, b0)
return(strcmp(a->n_un.n_name, b->n_un.n_name));
}
+int
rname(a0, b0)
void *a0, *b0;
{
@@ -605,6 +617,7 @@ rname(a0, b0)
return(strcmp(b->n_un.n_name, a->n_un.n_name));
}
+int
value(a0, b0)
void *a0, *b0;
{
@@ -635,13 +648,14 @@ emalloc(size)
char *p;
/* NOSTRICT */
- if (p = malloc(size))
+ if ( (p = malloc(size)) )
return(p);
(void)fprintf(stderr, "nm: %s\n", strerror(errno));
exit(1);
}
-usage()
+void
+usage(void)
{
(void)fprintf(stderr, "usage: nm [-agnopruw] [file ...]\n");
exit(1);
diff --git a/usr.bin/ranlib/build.c b/usr.bin/ranlib/build.c
index 0951f2e..3b70630 100644
--- a/usr.bin/ranlib/build.c
+++ b/usr.bin/ranlib/build.c
@@ -48,10 +48,17 @@ static char sccsid[] = "@(#)build.c 8.1 (Berkeley) 6/6/93";
#include <fcntl.h>
#include <ranlib.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include "archive.h"
+extern int tmp __P(( void ));
+extern void error __P(( char * ));
+extern void badfmt __P(( void ));
+extern void settime __P(( int ));
+
extern CHDR chdr; /* converted header */
extern char *archive; /* archive name */
extern char *tname; /* temporary file "name" */
@@ -72,7 +79,8 @@ long tsymlen; /* total string length */
static void rexec __P((int, int));
static void symobj __P((void));
-build()
+int
+build(void)
{
CF cf;
int afd, tfd;
diff --git a/usr.bin/ranlib/misc.c b/usr.bin/ranlib/misc.c
index 5d1fe8f..600e49e 100644
--- a/usr.bin/ranlib/misc.c
+++ b/usr.bin/ranlib/misc.c
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93";
#include <sys/signal.h>
#include <errno.h>
#include <unistd.h>
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -50,7 +51,10 @@ static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93";
extern char *archive; /* archive name */
char *tname = "temporary file"; /* temporary file "name" */
-tmp()
+void error __P(( char * ));
+
+int
+tmp(void)
{
sigset_t set, oset;
int fd;
@@ -90,12 +94,14 @@ rname(path)
return((ind = rindex(path, '/')) ? ind + 1 : path);
}
-badfmt()
+void
+badfmt(void)
{
errno = EFTYPE;
error(archive);
}
+void
error(name)
char *name;
{
diff --git a/usr.bin/ranlib/ranlib.c b/usr.bin/ranlib/ranlib.c
index 9d1d8a1..c109139 100644
--- a/usr.bin/ranlib/ranlib.c
+++ b/usr.bin/ranlib/ranlib.c
@@ -50,10 +50,15 @@ static char sccsid[] = "@(#)ranlib.c 8.1 (Berkeley) 6/6/93";
#include <stdlib.h>
#include <archive.h>
+extern int build __P(( void ));
+extern int touch __P(( void ));
+void usage __P((void));
+
CHDR chdr;
u_int options; /* UNUSED -- keep open_archive happy */
char *archive;
+int
main(argc, argv)
int argc;
char **argv;
@@ -77,13 +82,15 @@ main(argc, argv)
if (!*argv)
usage();
- for (eval = 0; archive = *argv++;)
+ for (eval = 0; (archive = *argv++); )
eval |= tflag ? touch() : build();
exit(eval);
}
-usage()
+void
+usage(void)
{
(void)fprintf(stderr, "usage: ranlib [-t] archive ...\n");
exit(1);
}
+
diff --git a/usr.bin/ranlib/touch.c b/usr.bin/ranlib/touch.c
index 0dd9123..68a86a4 100644
--- a/usr.bin/ranlib/touch.c
+++ b/usr.bin/ranlib/touch.c
@@ -52,7 +52,12 @@ static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93";
extern CHDR chdr; /* converted header */
extern char *archive; /* archive name */
-touch()
+extern void error __P(( char * ));
+void settime __P(( int ));
+int touch __P(( void ));
+
+int
+touch(void)
{
int afd;
@@ -69,6 +74,7 @@ touch()
return(0);
}
+void
settime(afd)
int afd;
{
diff --git a/usr.bin/rpcgen/rpc_clntout.c b/usr.bin/rpcgen/rpc_clntout.c
index 9137ce1..e4a9db7 100644
--- a/usr.bin/rpcgen/rpc_clntout.c
+++ b/usr.bin/rpcgen/rpc_clntout.c
@@ -43,10 +43,10 @@ static char sccsid[] = "@(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI";
#include "rpc_parse.h"
#include "rpc_util.h"
-extern int pdeclaration __P(( char *, declaration *, int, char * ));
+extern void pdeclaration __P(( char *, declaration *, int, char * ));
void printarglist __P(( proc_list *, char *, char *, char *));
-static int write_program __P(( definition * ));
-static int printbody __P(( proc_list * ));
+static void write_program __P(( definition * ));
+static void printbody __P(( proc_list * ));
static char RESULT[] = "clnt_res";
@@ -72,7 +72,7 @@ write_stubs()
}
}
-static
+static void
write_program(def)
definition *def;
{
@@ -218,13 +218,12 @@ ampr(type)
}
}
-static
+static void
printbody(proc)
proc_list *proc;
{
decl_list *l;
bool_t args2 = (proc->arg_num > 1);
- int i;
/*
* For new style with multiple arguments, need a structure in which
diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c
index e79ac9d..7445fd7 100644
--- a/usr.bin/rpcgen/rpc_cout.c
+++ b/usr.bin/rpcgen/rpc_cout.c
@@ -39,17 +39,20 @@ static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
*/
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include "rpc_parse.h"
#include "rpc_util.h"
-static int print_header __P(( definition * ));
-static int print_trailer __P(( void ));
-static int print_stat __P(( int , declaration * ));
-static int emit_enum __P(( definition * ));
-static int emit_program __P(( definition * ));
-static int emit_union __P(( definition * ));
-static int emit_struct __P(( definition * ));
-static int emit_typedef __P(( definition * ));
+static void print_header __P(( definition * ));
+static void print_trailer __P(( void ));
+static void print_stat __P(( int , declaration * ));
+static void emit_enum __P(( definition * ));
+static void emit_program __P(( definition * ));
+static void emit_union __P(( definition * ));
+static void emit_struct __P(( definition * ));
+static void emit_typedef __P(( definition * ));
+static void emit_inline __P(( int, declaration *, int ));
+static void emit_single_in_line __P(( int, declaration *, int, relation ));
/*
* Emit the C-routine for the given definition
@@ -89,11 +92,13 @@ emit(def)
case DEF_TYPEDEF:
emit_typedef(def);
break;
+ /* DEF_CONST and DEF_PROGRAM have already been handled */
+ default:
}
print_trailer();
}
-static
+static int
findtype(def, type)
definition *def;
char *type;
@@ -106,7 +111,7 @@ findtype(def, type)
}
}
-static
+static int
undefined(type)
char *type;
{
@@ -117,7 +122,7 @@ undefined(type)
}
-static
+static void
print_generic_header(procname, pointerp)
char* procname;
int pointerp;
@@ -141,15 +146,10 @@ print_generic_header(procname, pointerp)
}
}
-static
+static void
print_header(def)
definition *def;
{
-
- decl_list *dl;
- bas_type *ptr;
- int i;
-
print_generic_header(def->def_name,
def->def_kind != DEF_TYPEDEF ||
!isvectordef(def->def.ty.old_type,
@@ -162,14 +162,14 @@ print_header(def)
f_print(fout, "\tregister long *buf;\n\n");
}
-static
+static void
print_prog_header(plist)
proc_list *plist;
{
print_generic_header(plist->args.argname, 1);
}
-static
+static void
print_trailer()
{
f_print(fout, "\treturn (TRUE);\n");
@@ -177,7 +177,7 @@ print_trailer()
}
-static
+static void
print_ifopen(indent, name)
int indent;
char *name;
@@ -186,14 +186,14 @@ print_ifopen(indent, name)
f_print(fout, "if (!xdr_%s(xdrs", name);
}
-static
+static void
print_ifarg(arg)
char *arg;
{
f_print(fout, ", %s", arg);
}
-static
+static void
print_ifsizeof(indent, prefix, type)
int indent;
char *prefix;
@@ -216,7 +216,7 @@ print_ifsizeof(indent, prefix, type)
}
}
-static
+static void
print_ifclose(indent)
int indent;
{
@@ -225,7 +225,7 @@ print_ifclose(indent)
f_print(fout, "\treturn (FALSE);\n");
}
-static
+static void
print_ifstat(indent, prefix, type, rel, amax, objname, name)
int indent;
char *prefix;
@@ -302,7 +302,7 @@ print_ifstat(indent, prefix, type, rel, amax, objname, name)
}
/* ARGSUSED */
-static
+static void
emit_enum(def)
definition *def;
{
@@ -311,7 +311,7 @@ emit_enum(def)
print_ifclose(1);
}
-static
+static void
emit_program(def)
definition *def;
{
@@ -332,7 +332,7 @@ emit_program(def)
}
-static
+static void
emit_union(def)
definition *def;
{
@@ -385,6 +385,9 @@ strlen(dflt->name) + 1);
dflt->array_max, object, dflt->name);
free(object);
f_print(fout, "\t\tbreak;\n");
+ } else {
+ f_print(fout, "\tdefault:\n");
+ f_print(fout, "\t\tbreak;\n");
}
} else {
f_print(fout, "\tdefault:\n");
@@ -553,12 +556,12 @@ int flag;
}
}
-static
+static void
emit_struct(def)
definition *def;
{
decl_list *dl;
- int i, j, size, flag;
+ int j, size, flag;
bas_type *ptr;
int can_inline;
@@ -623,7 +626,7 @@ emit_struct(def)
}
-static
+static void
emit_typedef(def)
definition *def;
{
@@ -635,7 +638,7 @@ emit_typedef(def)
print_ifstat(1, prefix, type, rel, amax, "objp", def->def_name);
}
-static
+static void
print_stat(indent, dec)
int indent;
declaration *dec;
@@ -657,6 +660,7 @@ print_stat(indent, dec)
char *upcase ();
+static void
emit_inline(indent, decl, flag)
int indent;
declaration *decl;
@@ -681,9 +685,11 @@ int flag;
f_print(fout, "}\n");
tabify(fout, indent);
f_print(fout, "}\n");
+ default:
}
}
+static void
emit_single_in_line(indent, decl, flag, rel)
int indent;
declaration *decl;
diff --git a/usr.bin/rpcgen/rpc_hout.c b/usr.bin/rpcgen/rpc_hout.c
index ae73454..8dce77de 100644
--- a/usr.bin/rpcgen/rpc_hout.c
+++ b/usr.bin/rpcgen/rpc_hout.c
@@ -43,16 +43,18 @@ static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI";
#include "rpc_util.h"
void storexdrfuncdecl __P(( char *, int ));
-static int pconstdef __P(( definition * ));
-static int pstructdef __P(( definition * ));
-static int puniondef __P(( definition * ));
-static int pprogramdef __P(( definition * ));
-static int pstructdef __P(( definition * ));
-static int penumdef __P(( definition * ));
-static int ptypedef __P(( definition * ));
-static int pdefine __P(( char *, char * ));
+static void pconstdef __P(( definition * ));
+static void pstructdef __P(( definition * ));
+static void puniondef __P(( definition * ));
+static void pprogramdef __P(( definition * ));
+static void pstructdef __P(( definition * ));
+static void penumdef __P(( definition * ));
+static void ptypedef __P(( definition * ));
+static void pdefine __P(( char *, char * ));
static int undefined2 __P(( char *, char * ));
-static int parglist __P(( proc_list *, char * ));
+static void parglist __P(( proc_list *, char * ));
+static void pprocdef __P(( proc_list *, version_list *, char *, int, int ));
+void pdeclaration __P(( char *, declaration *, int, char * ));
static char RESULT[] = "clnt_res";
@@ -109,7 +111,8 @@ print_funcdef(def)
f_print(fout, "\n");
pprogramdef(def);
break;
- }
+ default:
+ }
}
/* store away enough information to allow the XDR functions to be spat
@@ -157,7 +160,7 @@ int i;
}
-static
+static void
pconstdef(def)
definition *def;
{
@@ -167,7 +170,7 @@ pconstdef(def)
/* print out the definitions for the arguments of functions in the
header file
*/
-static
+static void
pargdef(def)
definition *def;
{
@@ -201,7 +204,7 @@ pargdef(def)
}
-static
+static void
pstructdef(def)
definition *def;
{
@@ -216,7 +219,7 @@ pstructdef(def)
f_print(fout, "typedef struct %s %s;\n", name, name);
}
-static
+static void
puniondef(def)
definition *def;
{
@@ -245,7 +248,7 @@ puniondef(def)
f_print(fout, "typedef struct %s %s;\n", name, name);
}
-static
+static void
pdefine(name, num)
char *name;
char *num;
@@ -253,7 +256,7 @@ pdefine(name, num)
f_print(fout, "#define\t%s %s\n", name, num);
}
-static
+static void
puldefine(name, num)
char *name;
char *num;
@@ -261,7 +264,7 @@ puldefine(name, num)
f_print(fout, "#define\t%s ((unsigned long)(%s))\n", name, num);
}
-static
+static int
define_printed(stop, start)
proc_list *stop;
version_list *start;
@@ -282,7 +285,7 @@ define_printed(stop, start)
/* NOTREACHED */
}
-static
+static void
pfreeprocdef(char * name, char *vers, int mode)
{
f_print(fout, "extern int ");
@@ -295,7 +298,7 @@ pfreeprocdef(char * name, char *vers, int mode)
}
-static
+static void
pprogramdef(def)
definition *def;
{
@@ -371,6 +374,7 @@ pprogramdef(def)
}
}
+static void
pprocdef(proc, vp, addargtype, server_p, mode)
proc_list *proc;
version_list *vp;
@@ -399,15 +403,12 @@ pprocdef(proc, vp, addargtype, server_p, mode)
parglist(proc, addargtype);
else
f_print(fout, "();\n");
-
-
-
}
/* print out argument list of procedure */
-static
+static void
parglist(proc, addargtype)
proc_list *proc;
char* addargtype;
@@ -438,7 +439,7 @@ parglist(proc, addargtype)
}
-static
+static void
penumdef(def)
definition *def;
{
@@ -470,7 +471,7 @@ penumdef(def)
f_print(fout, "typedef enum %s %s;\n", name, name);
}
-static
+static void
ptypedef(def)
definition *def;
{
@@ -517,6 +518,7 @@ ptypedef(def)
}
}
+void
pdeclaration(name, dec, tab, separator)
char *name;
declaration *dec;
@@ -575,7 +577,7 @@ pdeclaration(name, dec, tab, separator)
f_print(fout, separator);
}
-static
+static int
undefined2(type, stop)
char *type;
char *stop;
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c
index 6902530..59431c3 100644
--- a/usr.bin/rpcgen/rpc_main.c
+++ b/usr.bin/rpcgen/rpc_main.c
@@ -42,6 +42,7 @@ static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <ctype.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/file.h>
@@ -53,23 +54,26 @@ static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
extern void write_sample_svc __P(( definition * ));
extern int write_sample_clnt __P(( definition * ));
extern void write_sample_clnt_main __P(( void ));
-static int c_output __P(( char *, char *, int, char * ));
-static int h_output __P(( char *, char *, int, char * ));
-static int l_output __P(( char *, char *, int, char * ));
-static int t_output __P(( char *, char *, int, char * ));
-static int clnt_output __P(( char *, char *, int, char * ));
+extern void add_sample_msg __P(( void ));
+static void c_output __P(( char *, char *, int, char * ));
+static void h_output __P(( char *, char *, int, char * ));
+static void l_output __P(( char *, char *, int, char * ));
+static void t_output __P(( char *, char *, int, char * ));
+static void clnt_output __P(( char *, char *, int, char * ));
+
+void c_initialize __P(( void ));
#ifndef __FreeBSD__
char * rindex();
#endif
-static int usage __P(( void ));
-static int options_usage __P (( void ));
+static void usage __P(( void ));
+static void options_usage __P (( void ));
static int do_registers __P(( int, char ** ));
static int parseargs __P(( int, char **, struct commandline * ));
-static int svc_output __P(( char *, char *, int, char * ));
+static void svc_output __P(( char *, char *, int, char * ));
static void mkfile_output __P(( struct commandline * ));
-static int s_output __P(( int, char **, char *, char *, int, char *, int, int ));
+static void s_output __P(( int, char **, char *, char *, int, char *, int, int ));
#define EXTEND 1 /* alias for TRUE */
#define DONT_EXTEND 0 /* alias for FALSE */
@@ -156,6 +160,7 @@ xdrfunc *xdrfunc_tail = NULL; /* xdr function list */
pid_t childpid;
+int
main(argc, argv)
int argc;
char *argv[];
@@ -274,7 +279,7 @@ extendfile(file, ext)
/*
* Open output file with given extension
*/
-static
+static void
open_output(infile, outfile)
char *infile;
char *outfile;
@@ -298,9 +303,10 @@ open_output(infile, outfile)
}
record_open(outfile);
+ return;
}
-static
+static void
add_warning()
{
f_print(fout, "/*\n");
@@ -342,7 +348,7 @@ static void find_cpp()
/*
* Open input file with given define for C-preprocessor
*/
-static
+static void
open_input(infile, define)
char *infile;
char *define;
@@ -432,7 +438,7 @@ char *ext;
}
-static
+static void
c_output(infile, define, extend, outfile)
char *infile;
char *define;
@@ -456,7 +462,7 @@ c_output(infile, define, extend, outfile)
} else
f_print(fout, "#include <rpc/rpc.h>\n");
tell = ftell(fout);
- while (def = get_definition()) {
+ while ( (def = get_definition()) ) {
emit(def);
}
if (extend && tell == ftell(fout)) {
@@ -465,6 +471,7 @@ c_output(infile, define, extend, outfile)
}
+void
c_initialize()
{
@@ -512,7 +519,7 @@ char *generate_guard(pathname)
*/
-static
+static void
h_output(infile, define, extend, outfile)
char *infile;
char *define;
@@ -558,7 +565,7 @@ h_output(infile, define, extend, outfile)
tell = ftell(fout);
/* print data definitions */
- while (def = get_definition()) {
+ while ( (def = get_definition()) ) {
print_datadef(def);
}
@@ -627,7 +634,7 @@ h_output(infile, define, extend, outfile)
/*
* Compile into an RPC service
*/
-static
+static void
s_output(argc, argv, infile, define, extend, outfile, nomain, netflag)
int argc;
char *argv[];
@@ -710,7 +717,7 @@ s_output(argc, argv, infile, define, extend, outfile, nomain, netflag)
if (timerflag)
f_print(fout, "\n#define _RPCSVC_CLOSEDOWN %s\n",
svcclosetime);
- while (def = get_definition()) {
+ while ( (def = get_definition()) ) {
foundprogram |= (def->def_kind == DEF_PROGRAM);
}
if (extend && !foundprogram) {
@@ -731,7 +738,7 @@ s_output(argc, argv, infile, define, extend, outfile, nomain, netflag)
/*
* generate client side stubs
*/
-static
+static void
l_output(infile, define, extend, outfile)
char *infile;
char *define;
@@ -754,7 +761,7 @@ l_output(infile, define, extend, outfile)
free(include);
} else
f_print(fout, "#include <rpc/rpc.h>\n");
- while (def = get_definition()) {
+ while ( (def = get_definition()) ) {
foundprogram |= (def->def_kind == DEF_PROGRAM);
}
if (extend && !foundprogram) {
@@ -767,7 +774,7 @@ l_output(infile, define, extend, outfile)
/*
* generate the dispatch table
*/
-static
+static void
t_output(infile, define, extend, outfile)
char *infile;
char *define;
@@ -782,7 +789,7 @@ t_output(infile, define, extend, outfile)
outfilename = extend ? extendfile(infile, outfile) : outfile;
open_output(infile, outfilename);
add_warning();
- while (def = get_definition()) {
+ while ( (def = get_definition()) ) {
foundprogram |= (def->def_kind == DEF_PROGRAM);
}
if (extend && !foundprogram) {
@@ -793,7 +800,7 @@ t_output(infile, define, extend, outfile)
}
/* sample routine for the server template */
-static
+static void
svc_output(infile, define, extend, outfile)
char *infile;
char *define;
@@ -821,7 +828,7 @@ svc_output(infile, define, extend, outfile)
f_print(fout, "#include <rpc/rpc.h>\n");
tell = ftell(fout);
- while (def = get_definition()) {
+ while ( (def = get_definition()) ) {
write_sample_svc(def);
}
if (extend && tell == ftell(fout)) {
@@ -830,7 +837,7 @@ svc_output(infile, define, extend, outfile)
}
/* sample main routine for client */
-static
+static void
clnt_output(infile, define, extend, outfile)
char *infile;
char *define;
@@ -859,7 +866,7 @@ clnt_output(infile, define, extend, outfile)
} else
f_print(fout, "#include <rpc/rpc.h>\n");
tell = ftell(fout);
- while (def = get_definition()) {
+ while ( (def = get_definition()) ) {
has_program += write_sample_clnt(def);
}
@@ -981,8 +988,8 @@ $(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n");
* Perform registrations for service output
* Return 0 if failed; 1 otherwise.
*/
-static
-int do_registers(argc, argv)
+static int
+do_registers(argc, argv)
int argc;
char *argv[];
{
@@ -1078,7 +1085,7 @@ char *outfile;
/*
* Parse command line arguments
*/
-static
+static int
parseargs(argc, argv, cmd)
int argc;
char *argv[];
@@ -1129,10 +1136,10 @@ parseargs(argc, argv, cmd)
case 'l':
case 'm':
case 't':
- if (flag[c]) {
+ if (flag[(int)c]) {
return (0);
}
- flag[c] = 1;
+ flag[(int)c] = 1;
break;
case 'S':
/*
@@ -1151,10 +1158,10 @@ parseargs(argc, argv, cmd)
else
return (0);
- if (flag[ch]) {
+ if (flag[(int)ch]) {
return (0);
}
- flag[ch] = 1;
+ flag[(int)ch] = 1;
break;
case 'C': /* ANSI C syntax */
Cflag = 1;
@@ -1211,7 +1218,7 @@ parseargs(argc, argv, cmd)
argv[i][j + 1] != 0) {
return (0);
}
- flag[c] = 1;
+ flag[(int)c] = 1;
if (++i == argc) {
return (0);
}
@@ -1306,7 +1313,7 @@ parseargs(argc, argv, cmd)
return (1);
}
-static
+static void
usage()
{
f_print(stderr, "usage: %s infile\n", cmdname);
@@ -1324,7 +1331,7 @@ usage()
exit(1);
}
-static
+static void
options_usage()
{
f_print(stderr, "options:\n");
diff --git a/usr.bin/rpcgen/rpc_parse.c b/usr.bin/rpcgen/rpc_parse.c
index fb8eec1..5431520 100644
--- a/usr.bin/rpcgen/rpc_parse.c
+++ b/usr.bin/rpcgen/rpc_parse.c
@@ -47,17 +47,17 @@ static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI";
#define ARGNAME "arg"
extern char *make_argname __P(( char *, char * ));
-static int isdefined __P(( definition * ));
-static int def_struct __P(( definition * ));
-static int def_program __P(( definition * ));
-static int def_enum __P(( definition * ));
-static int def_const __P(( definition * ));
-static int def_union __P(( definition * ));
-static int def_typedef __P(( definition * ));
-static int get_declaration __P(( declaration *, defkind ));
-static int get_prog_declaration __P(( declaration *, defkind, int ));
-static int get_type __P(( char **, char **, defkind ));
-static int unsigned_dec __P(( char ** ));
+static void isdefined __P(( definition * ));
+static void def_struct __P(( definition * ));
+static void def_program __P(( definition * ));
+static void def_enum __P(( definition * ));
+static void def_const __P(( definition * ));
+static void def_union __P(( definition * ));
+static void def_typedef __P(( definition * ));
+static void get_declaration __P(( declaration *, defkind ));
+static void get_prog_declaration __P(( declaration *, defkind, int ));
+static void get_type __P(( char **, char **, defkind ));
+static void unsigned_dec __P(( char ** ));
#ifndef __FreeBSD__
extern char *strdup();
@@ -103,14 +103,14 @@ get_definition()
return (defp);
}
-static
+static void
isdefined(defp)
definition *defp;
{
STOREVAL(&defined, defp);
}
-static
+static void
def_struct(defp)
definition *defp;
{
@@ -138,7 +138,7 @@ def_struct(defp)
*tailp = NULL;
}
-static
+static void
def_program(defp)
definition *defp;
{
@@ -245,7 +245,7 @@ def_program(defp)
}
-static
+static void
def_enum(defp)
definition *defp;
{
@@ -275,7 +275,7 @@ def_enum(defp)
*tailp = NULL;
}
-static
+static void
def_const(defp)
definition *defp;
{
@@ -289,13 +289,13 @@ def_const(defp)
defp->def.co = tok.str;
}
-static
+static void
def_union(defp)
definition *defp;
{
token tok;
declaration dec;
- case_list *cases, *tcase;
+ case_list *cases;
case_list **tailp;
int flag;
@@ -388,7 +388,8 @@ static char* reserved_types[] =
* check that the given name is not one that would eventually result in
* xdr routines that would conflict with internal XDR routines.
*/
-static check_type_name(name, new_type)
+static void
+check_type_name(name, new_type)
int new_type;
char* name;
{
@@ -417,7 +418,7 @@ char* name;
-static
+static void
def_typedef(defp)
definition *defp;
{
@@ -433,7 +434,7 @@ def_typedef(defp)
defp->def.ty.array_max = dec.array_max;
}
-static
+static void
get_declaration(dec, dkind)
declaration *dec;
defkind dkind;
@@ -486,7 +487,7 @@ get_declaration(dec, dkind)
}
-static
+static void
get_prog_declaration(dec, dkind, num)
declaration *dec;
defkind dkind;
@@ -559,7 +560,7 @@ get_prog_declaration(dec, dkind, num)
-static
+static void
get_type(prefixp, typep, dkind)
char **prefixp;
char **typep;
@@ -617,7 +618,7 @@ get_type(prefixp, typep, dkind)
}
}
-static
+static void
unsigned_dec(typep)
char **typep;
{
diff --git a/usr.bin/rpcgen/rpc_sample.c b/usr.bin/rpcgen/rpc_sample.c
index 435bb44..1de374c 100644
--- a/usr.bin/rpcgen/rpc_sample.c
+++ b/usr.bin/rpcgen/rpc_sample.c
@@ -43,9 +43,9 @@
static char RQSTP[] = "rqstp";
extern void printarglist __P(( proc_list *, char *, char *, char *));
-static int write_sample_client __P(( char *, version_list * ));
-static int write_sample_server __P(( definition * ));
-static int return_type __P(( proc_list * ));
+static void write_sample_client __P(( char *, version_list * ));
+static void write_sample_server __P(( definition * ));
+static void return_type __P(( proc_list * ));
void
write_sample_svc(def)
@@ -76,7 +76,7 @@ write_sample_clnt(def)
}
-static
+static void
write_sample_client(program_name, vp)
char *program_name;
version_list *vp;
@@ -192,7 +192,7 @@ write_sample_client(program_name, vp)
f_print(fout, "}\n");
}
-static
+static void
write_sample_server(def)
definition *def;
{
@@ -261,13 +261,14 @@ write_sample_server(def)
-static
+static void
return_type(plist)
proc_list *plist;
{
ptype(plist->res_prefix, plist->res_type, 1);
}
+void
add_sample_msg()
{
f_print(fout, "/*\n");
diff --git a/usr.bin/rpcgen/rpc_scan.c b/usr.bin/rpcgen/rpc_scan.c
index e65b799..d1d03aa 100644
--- a/usr.bin/rpcgen/rpc_scan.c
+++ b/usr.bin/rpcgen/rpc_scan.c
@@ -52,15 +52,15 @@ static char sccsid[] = "@(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI";
static int pushed = 0; /* is a token pushed */
static token lasttok; /* last token, if pushed */
-static int unget_token __P(( token * ));
-static int findstrconst __P(( char **, char **));
-static int findchrconst __P(( char **, char **));
-static int findconst __P(( char **, char **));
-static int findkind __P(( char **, token * ));
+static void unget_token __P(( token * ));
+static void findstrconst __P(( char **, char **));
+static void findchrconst __P(( char **, char **));
+static void findconst __P(( char **, char **));
+static void findkind __P(( char **, token * ));
static int cppline __P(( char * ));
static int directive __P(( char * ));
-static int printdirective __P(( char * ));
-static int docppline __P(( char *, int *, char ** ));
+static void printdirective __P(( char * ));
+static void docppline __P(( char *, int *, char ** ));
/*
* scan expecting 1 given token
@@ -315,7 +315,7 @@ get_token(tokp)
}
}
-static
+static void
unget_token(tokp)
token *tokp;
{
@@ -323,7 +323,7 @@ unget_token(tokp)
pushed = 1;
}
-static
+static void
findstrconst(str, val)
char **str;
char **val;
@@ -333,7 +333,7 @@ findstrconst(str, val)
p = *str;
do {
- *p++;
+ p++;
} while (*p && *p != '"');
if (*p == 0) {
error("unterminated string constant");
@@ -346,7 +346,7 @@ findstrconst(str, val)
*str = p;
}
-static
+static void
findchrconst(str, val)
char **str;
char **val;
@@ -356,7 +356,7 @@ findchrconst(str, val)
p = *str;
do {
- *p++;
+ p++;
} while (*p && *p != '\'');
if (*p == 0) {
error("unterminated string constant");
@@ -372,7 +372,7 @@ findchrconst(str, val)
*str = p;
}
-static
+static void
findconst(str, val)
char **str;
char **val;
@@ -425,7 +425,7 @@ static token symbols[] = {
{TOK_EOF, "??????"},
};
-static
+static void
findkind(mark, tokp)
char **mark;
token *tokp;
@@ -454,28 +454,28 @@ findkind(mark, tokp)
*mark = str + len;
}
-static
+static int
cppline(line)
char *line;
{
return (line == curline && *line == '#');
}
-static
+static int
directive(line)
char *line;
{
return (line == curline && *line == '%');
}
-static
+static void
printdirective(line)
char *line;
{
f_print(fout, "%s", line + 1);
}
-static
+static void
docppline(line, lineno, fname)
char *line;
int *lineno;
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c
index a7b7d87..cb26f22 100644
--- a/usr.bin/rpcgen/rpc_svcout.c
+++ b/usr.bin/rpcgen/rpc_svcout.c
@@ -52,21 +52,23 @@ static char RETVAL[] = "retval";
char _errbuf[256]; /* For all messages */
void internal_proctype __P(( proc_list * ));
-static int write_real_program __P(( definition * ));
-static int write_program __P(( definition *, char * ));
-static int printerr __P(( char *, char * ));
-static int printif __P(( char *, char *, char *, char * ));
-static int write_inetmost __P(( char * ));
-static int print_return __P(( char * ));
-static int print_pmapunset __P(( char * ));
-static int print_err_message __P(( char * ));
-static int write_timeout_func __P(( void ));
-static int write_pm_most __P(( char *, int ));
-static int write_rpc_svc_fg __P(( char *, char * ));
-static int open_log_file __P(( char *, char * ));
-
-
-static
+static void write_real_program __P(( definition * ));
+static void write_program __P(( definition *, char * ));
+static void printerr __P(( char *, char * ));
+static void printif __P(( char *, char *, char *, char * ));
+static void write_inetmost __P(( char * ));
+static void print_return __P(( char * ));
+static void print_pmapunset __P(( char * ));
+static void print_err_message __P(( char * ));
+static void write_timeout_func __P(( void ));
+static void write_pm_most __P(( char *, int ));
+static void write_rpc_svc_fg __P(( char *, char * ));
+static void open_log_file __P(( char *, char * ));
+static void write_msg_out __P(( void ));
+int nullproc __P(( proc_list * ));
+
+
+static void
p_xdrfunc(rname, typename)
char* rname;
char* typename;
@@ -320,7 +322,7 @@ write_programs(storage)
* Unpacks single user argument of printmsg_1 to call-by-value format
* expected by printmsg_1.
*/
-static
+static void
write_real_program(def)
definition *def;
{
@@ -399,7 +401,7 @@ write_real_program(def)
}
}
-static
+static void
write_program(def, storage)
definition *def;
char *storage;
@@ -618,7 +620,7 @@ write_program(def, storage)
}
}
-static
+static void
printerr(err, transp)
char *err;
char *transp;
@@ -626,7 +628,7 @@ printerr(err, transp)
f_print(fout, "\t\tsvcerr_%s(%s);\n", err, transp);
}
-static
+static void
printif(proc, transp, prefix, arg)
char *proc;
char *transp;
@@ -637,6 +639,7 @@ printif(proc, transp, prefix, arg)
proc, transp, arg, prefix, arg);
}
+int
nullproc(proc)
proc_list *proc;
{
@@ -648,7 +651,7 @@ nullproc(proc)
return (0);
}
-static
+static void
write_inetmost(infile)
char *infile;
{
@@ -677,7 +680,7 @@ write_inetmost(infile)
f_print(fout, "\t}\n");
}
-static
+static void
print_return(space)
char *space;
{
@@ -695,7 +698,7 @@ print_return(space)
}
}
-static
+static void
print_pmapunset(space)
char *space;
{
@@ -715,7 +718,7 @@ print_pmapunset(space)
}
}
-static
+static void
print_err_message(space)
char *space;
{
@@ -744,7 +747,8 @@ write_svc_aux(nomain)
* Write the _msgout function
*/
-write_msg_out()
+static void
+write_msg_out(void)
{
f_print(fout, "\n");
/*
@@ -776,8 +780,8 @@ write_msg_out()
/*
* Write the timeout function
*/
-static
-write_timeout_func()
+static void
+write_timeout_func(void)
{
if (!timerflag)
return;
@@ -841,7 +845,7 @@ write_timeout_func()
/*
* Write the most of port monitor support
*/
-static
+static void
write_pm_most(infile, netflag)
char *infile;
int netflag;
@@ -940,7 +944,7 @@ ioctl(0, I_PUSH, \"timod\")) {\n");
/*
* Support for backgrounding the server if self started.
*/
-static
+static void
write_rpc_svc_fg(infile, sp)
char *infile;
char *sp;
@@ -992,7 +996,7 @@ write_rpc_svc_fg(infile, sp)
open_log_file(infile, sp);
}
-static
+static void
open_log_file(infile, sp)
char *infile;
char *sp;
diff --git a/usr.bin/rpcgen/rpc_tblout.c b/usr.bin/rpcgen/rpc_tblout.c
index e851ded..f8b56798 100644
--- a/usr.bin/rpcgen/rpc_tblout.c
+++ b/usr.bin/rpcgen/rpc_tblout.c
@@ -58,8 +58,9 @@ static char null_entry[] = "\n\t(char *(*)())0,\n\
static char tbl_nproc[] = "int %s_nproc =\n\tsizeof(%s_table)/sizeof(%s_table[0]);\n\n";
-static int write_table __P(( definition * ));
-static int printit __P(( char *, char * ));
+extern int nullproc __P(( proc_list * ));
+static void write_table __P(( definition * ));
+static void printit __P(( char *, char * ));
void
write_tables()
@@ -76,7 +77,7 @@ write_tables()
}
}
-static
+static void
write_table(def)
definition *def;
{
@@ -143,7 +144,7 @@ write_table(def)
}
}
-static
+static void
printit(prefix, type)
char *prefix;
char *type;
diff --git a/usr.bin/rpcgen/rpc_util.c b/usr.bin/rpcgen/rpc_util.c
index 5d3fa06..1ade911 100644
--- a/usr.bin/rpcgen/rpc_util.c
+++ b/usr.bin/rpcgen/rpc_util.c
@@ -38,7 +38,9 @@ static char sccsid[] = "@(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI";
* Copyright (C) 1989, Sun Microsystems, Inc.
*/
#include <stdio.h>
+#include <string.h>
#include <ctype.h>
+#include <unistd.h>
#include "rpc_scan.h"
#include "rpc_parse.h"
#include "rpc_util.h"
@@ -60,11 +62,12 @@ FILE *fin; /* file pointer of current input */
list *defined; /* list of defined things */
-static int printwhere __P(( void ));
+static void printwhere __P(( void ));
/*
* Reinitialize the world
*/
+void
reinitialize()
{
memset(curline, 0, MAXLINESIZE);
@@ -76,6 +79,7 @@ reinitialize()
/*
* string equality
*/
+int
streq(a, b)
char *a;
char *b;
@@ -119,7 +123,7 @@ storeval(lstp, val)
*l = lst;
}
-static
+static int
findit(def, type)
definition *def;
char *type;
@@ -192,7 +196,7 @@ ptype(prefix, type, follow)
}
}
-static
+static int
typedefed(def, type)
definition *def;
char *type;
@@ -204,6 +208,7 @@ typedefed(def, type)
}
}
+int
isvectordef(type, rel)
char *type;
relation rel;
@@ -227,6 +232,8 @@ isvectordef(type, rel)
rel = def->def.ty.rel;
}
}
+
+ return (0);
}
char *
@@ -237,7 +244,7 @@ locase(str)
static char buf[100];
char *p = buf;
- while (c = *str++) {
+ while ( (c = *str++) ) {
*p++ = (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c;
}
*p = 0;
@@ -277,6 +284,7 @@ error(msg)
* Something went wrong, unlink any files that we may have created and then
* die.
*/
+void
crash()
{
int i;
@@ -399,7 +407,7 @@ toktostr(kind)
return (sp->str);
}
-static
+static void
printbuf()
{
char c;
@@ -408,7 +416,7 @@ printbuf()
# define TABSIZE 4
- for (i = 0; c = curline[i]; i++) {
+ for (i = 0; (c = curline[i]); i++) {
if (c == '\t') {
cnt = 8 - (i % TABSIZE);
c = ' ';
@@ -421,7 +429,7 @@ printbuf()
}
}
-static
+static void
printwhere()
{
int i;
@@ -462,6 +470,7 @@ make_argname(pname, vname)
bas_type *typ_list_h;
bas_type *typ_list_t;
+void
add_type(len, type)
int len;
char *type;
diff --git a/usr.bin/rpcgen/rpc_util.h b/usr.bin/rpcgen/rpc_util.h
index 259860f..f465bfc 100644
--- a/usr.bin/rpcgen/rpc_util.h
+++ b/usr.bin/rpcgen/rpc_util.h
@@ -149,6 +149,10 @@ extern pid_t childpid;
/*
* rpc_util routines
*/
+void reinitialize();
+void crash();
+void add_type(int len, char *type);
+
void storeval();
#define STOREVAL(list,item) \
diff --git a/usr.bin/xlint/lint1/decl.c b/usr.bin/xlint/lint1/decl.c
index fa023b7..1151166 100644
--- a/usr.bin/xlint/lint1/decl.c
+++ b/usr.bin/xlint/lint1/decl.c
@@ -479,6 +479,7 @@ tdeferr(td, t)
}
break;
/* LINTED (enumeration values not handled in switch) */
+ default:
}
/* Anything other is not accepted. */
diff --git a/usr.bin/xlint/lint1/scan.l b/usr.bin/xlint/lint1/scan.l
index 53f0083..ece6ef9 100644
--- a/usr.bin/xlint/lint1/scan.l
+++ b/usr.bin/xlint/lint1/scan.l
@@ -43,6 +43,7 @@ static char rcsid[] = "$NetBSD: scan.l,v 1.8 1995/10/23 13:38:51 jpo Exp $";
#include <ctype.h>
#include <errno.h>
#include <err.h>
+#include <math.h>
#include "lint1.h"
#include "y.tab.h"
@@ -554,6 +555,7 @@ icon(base)
}
break;
/* LINTED (enumeration values not handled in switch) */
+ default:
}
if (typ != QUAD && typ != UQUAD) {
diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c
index 36dda83..5770f08 100644
--- a/usr.bin/xlint/lint1/tree.c
+++ b/usr.bin/xlint/lint1/tree.c
@@ -39,6 +39,7 @@ static char rcsid[] = "$NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $";
#include <string.h>
#include <float.h>
#include <limits.h>
+#include <math.h>
#include "lint1.h"
#include "y.tab.h"
@@ -1132,6 +1133,7 @@ typeok(op, arg, ln, rn)
nulleff(ln);
break;
/* LINTED (enumeration values not handled in switch) */
+ default:
}
if (mp->m_badeop &&
@@ -3575,6 +3577,7 @@ chkmisc(tn, vctx, tctx, eqwarn, fcall, rvdisc, szof)
case STRING:
return;
/* LINTED (enumeration values not handled in switch) */
+ default:
}
cvctx = mp->m_vctx;
@@ -3913,6 +3916,7 @@ precconf(tn)
}
break;
/* LINTED (enumeration values not handled in switch) */
+ default:
}
if (warn) {
diff --git a/usr.bin/xlint/lint2/read.c b/usr.bin/xlint/lint2/read.c
index daffe1e..6498a5c 100644
--- a/usr.bin/xlint/lint2/read.c
+++ b/usr.bin/xlint/lint2/read.c
@@ -613,6 +613,7 @@ inptype(cp, epp)
}
break;
/* LINTED (enumeration value(s) not handled in switch) */
+ default:
}
*epp = cp;
@@ -782,6 +783,7 @@ gettlen(cp, epp)
}
break;
/* LINTED (enumeration value(s) not handled in switch) */
+ default:
}
*epp = cp;
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c
index 852fd01..515456f 100644
--- a/usr.bin/xlint/xlint/xlint.c
+++ b/usr.bin/xlint/xlint/xlint.c
@@ -517,6 +517,7 @@ main(argc, argv)
terminate(0);
/* NOTREACHED */
+ return 0;
}
/*
OpenPOWER on IntegriCloud