From 372a715b2656521b7f9996e843503eaf6c1ba662 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Fri, 31 May 1996 10:37:26 +0000 Subject: -Wall and -Wstrict-prototypes cleanup --- sys/ddb/db_command.c | 24 ++++++++++++++++-------- sys/ddb/db_command.h | 5 ++++- sys/ddb/db_hangman.c | 11 ++++++++--- sys/ddb/db_sym.c | 3 ++- 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 5f1970b7eff..4ed6436264c 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.8 1996/05/05 12:23:09 mickey Exp $ */ +/* $OpenBSD: db_command.c,v 1.9 1996/05/31 10:37:24 niklas Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -339,10 +339,6 @@ struct db_command db_show_cmds[] = { { NULL, NULL, 0, NULL, } }; -void db_boot_sync_cmd(); -void db_boot_crash_cmd(); -void db_boot_dump_cmd(); - struct db_command db_boot_cmds[] = { { "sync", db_boot_sync_cmd, 0, 0 }, { "crash", db_boot_crash_cmd, 0, 0 }, @@ -519,19 +515,31 @@ db_fncall(addr, have_addr, count, modif) } void -db_boot_sync_cmd() +db_boot_sync_cmd(addr, haddr, count, modif) + db_expr_t addr; + int haddr; + db_expr_t count; + char *modif; { boot(RB_AUTOBOOT); } void -db_boot_crash_cmd() +db_boot_crash_cmd(addr, haddr, count, modif) + db_expr_t addr; + int haddr; + db_expr_t count; + char *modif; { boot(RB_NOSYNC | RB_DUMP); } void -db_boot_dump_cmd() +db_boot_dump_cmd(addr, haddr, count, modif) + db_expr_t addr; + int haddr; + db_expr_t count; + char *modif; { boot(RB_DUMP); } diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index 96df9372b2f..78d2bf9fcd5 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.h,v 1.4 1996/04/21 22:18:58 deraadt Exp $ */ +/* $OpenBSD: db_command.h,v 1.5 1996/05/31 10:37:24 niklas Exp $ */ /* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */ /* @@ -45,6 +45,9 @@ void db_help_cmd __P((void)); void db_command_loop __P((void)); void db_error __P((char *)); void db_fncall __P((db_expr_t, int, db_expr_t, char *)); +void db_boot_sync_cmd __P((db_expr_t, int, db_expr_t, char *)); +void db_boot_crash_cmd __P((db_expr_t, int, db_expr_t, char *)); +void db_boot_dump_cmd __P((db_expr_t, int, db_expr_t, char *)); db_addr_t db_dot; /* current location */ db_addr_t db_last_addr; /* last explicit address typed */ diff --git a/sys/ddb/db_hangman.c b/sys/ddb/db_hangman.c index 62be09d63c9..66e42b1f333 100644 --- a/sys/ddb/db_hangman.c +++ b/sys/ddb/db_hangman.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_hangman.c,v 1.4 1996/05/10 14:00:56 mickey Exp $ */ +/* $OpenBSD: db_hangman.c,v 1.5 1996/05/31 10:37:25 niklas Exp $ */ /* * Copyright (c) 1996 Theo de Raadt, Michael Shalayeff @@ -45,6 +45,11 @@ #define TOLOWER(c) (('A'<=(c)&&(c)<='Z')?(c)-'a'+'A':(c)) #define ISALPHA(c) (('a'<=(c)&&(c)<='z')||('A'<=(c)&&(c)<='Z')) +static __inline size_t db_random __P((size_t)); +static __inline char *db_randomsym __P((size_t *)); +static void db_hang __P((int, char *, char *)); +static int db_hangon __P((void)); + static __inline size_t db_random( mod ) register size_t mod; @@ -54,7 +59,7 @@ db_random( mod ) get_random_bytes(&ret, sizeof(ret) ); return ret % mod; #else - u_int random(); + u_int random __P((void)); return (size_t)(random() % mod); #endif } @@ -85,7 +90,7 @@ db_randomsym(lenp) } -static int +static void db_hang(tries, word, abc) int tries; register char *word; diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 3e7bd51e8fc..e56033f83c2 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_sym.c,v 1.10 1996/05/20 13:30:07 mickey Exp $ */ +/* $OpenBSD: db_sym.c,v 1.11 1996/05/31 10:37:25 niklas Exp $ */ /* $NetBSD: db_sym.c,v 1.12 1996/02/05 01:57:15 christos Exp $ */ /* @@ -30,6 +30,7 @@ #include #include #include +#include #include -- cgit v1.2.3