From 81c71a86b464e9b7fd1c0de4b0b6f69b37a700fd Mon Sep 17 00:00:00 2001 From: dsl Date: Sat, 16 Oct 2004 13:20:10 +0000 Subject: [PATCH] Make compile with WARNS=3 --- distrib/utils/sysinst/arch/amd64/md.c | 4 +--- distrib/utils/sysinst/arch/amd64/md.h | 5 +---- distrib/utils/sysinst/arch/hp300/md.c | 5 +++-- distrib/utils/sysinst/arch/mipsco/md.c | 5 +++-- distrib/utils/sysinst/arch/mvme68k/md.c | 5 +++-- distrib/utils/sysinst/arch/pmax/md.c | 5 +++-- distrib/utils/sysinst/arch/x68k/md.c | 5 +++-- distrib/utils/sysinst/disks.c | 3 +-- distrib/utils/sysinst/label.c | 5 ++--- distrib/utils/sysinst/mbr.c | 7 +++++-- distrib/utils/sysinst/wskbd.c | 5 +++-- 11 files changed, 28 insertions(+), 26 deletions(-) diff --git a/distrib/utils/sysinst/arch/amd64/md.c b/distrib/utils/sysinst/arch/amd64/md.c index c5e993210028..d93663719a8e 100644 --- a/distrib/utils/sysinst/arch/amd64/md.c +++ b/distrib/utils/sysinst/arch/amd64/md.c @@ -1,7 +1,5 @@ -/* $NetBSD: md.c,v 1.6 2004/06/06 06:06:59 christos Exp $ */ +/* $NetBSD: md.c,v 1.7 2004/10/16 13:20:11 dsl Exp $ */ /* md.c -- Machine specific code for amd64 */ -const char *boottype = ""; - #include "../i386/md.c" diff --git a/distrib/utils/sysinst/arch/amd64/md.h b/distrib/utils/sysinst/arch/amd64/md.h index 78e21c0e4a4d..69344f404990 100644 --- a/distrib/utils/sysinst/arch/amd64/md.h +++ b/distrib/utils/sysinst/arch/amd64/md.h @@ -1,4 +1,4 @@ -/* $NetBSD: md.h,v 1.17 2004/06/06 06:06:59 christos Exp $ */ +/* $NetBSD: md.h,v 1.18 2004/10/16 13:20:11 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -72,9 +72,6 @@ #define SET_KERNEL_GENERIC SET_KERNEL_1 -/* Bootblock type */ -const char *boottype; - /* * Machine-specific command to write a new label to a disk. * For example, i386 uses "/sbin/disklabel -w -r", just like i386 diff --git a/distrib/utils/sysinst/arch/hp300/md.c b/distrib/utils/sysinst/arch/hp300/md.c index 896871dd2ccb..fb89b3ca628a 100644 --- a/distrib/utils/sysinst/arch/hp300/md.c +++ b/distrib/utils/sysinst/arch/hp300/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.16 2004/08/14 16:06:40 dsl Exp $ */ +/* $NetBSD: md.c,v 1.17 2004/10/16 13:20:11 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -152,7 +152,8 @@ md_post_newfs(void) if (run_program(RUN_DISPLAY | RUN_NO_CLEAR, "/usr/mdec/installboot /usr/mdec/uboot.lif /dev/r%sa", diskdev)) - process_menu(MENU_ok, "Warning: disk is probably not bootable"); + process_menu(MENU_ok, + deconst("Warning: disk is probably not bootable")); return (0); } diff --git a/distrib/utils/sysinst/arch/mipsco/md.c b/distrib/utils/sysinst/arch/mipsco/md.c index 6aca12ebcffe..cb3d93726776 100644 --- a/distrib/utils/sysinst/arch/mipsco/md.c +++ b/distrib/utils/sysinst/arch/mipsco/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.10 2004/08/14 16:06:42 dsl Exp $ */ +/* $NetBSD: md.c,v 1.11 2004/10/16 13:20:11 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -153,7 +153,8 @@ md_post_newfs(void) cp_to_target("/usr/mdec/boot", "/boot"); if (run_program(RUN_DISPLAY | RUN_NO_CLEAR, "/usr/mdec/installboot /dev/r%sc /usr/mdec/bootxx_ffs", diskdev)) - process_menu(MENU_ok, "Warning: disk is probably not bootable"); + process_menu(MENU_ok, + deconst("Warning: disk is probably not bootable")); return 0; } diff --git a/distrib/utils/sysinst/arch/mvme68k/md.c b/distrib/utils/sysinst/arch/mvme68k/md.c index f8e47c8f1ff1..1709e2b04d2d 100644 --- a/distrib/utils/sysinst/arch/mvme68k/md.c +++ b/distrib/utils/sysinst/arch/mvme68k/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.15 2004/08/14 16:06:42 dsl Exp $ */ +/* $NetBSD: md.c,v 1.16 2004/10/16 13:20:11 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -151,7 +151,8 @@ md_post_newfs(void) if (run_program(RUN_DISPLAY | RUN_NO_CLEAR, "/usr/mdec/installboot %s /usr/mdec/bootxx /dev/r%sa", target_expand("/.bootsd"), diskdev)) - process_menu(MENU_ok, "Warning: disk is probably not bootable"); + process_menu(MENU_ok, + deconst("Warning: disk is probably not bootable")); return (0); } diff --git a/distrib/utils/sysinst/arch/pmax/md.c b/distrib/utils/sysinst/arch/pmax/md.c index 3124b4fdaa80..404463433bbf 100644 --- a/distrib/utils/sysinst/arch/pmax/md.c +++ b/distrib/utils/sysinst/arch/pmax/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.56 2004/08/14 16:06:42 dsl Exp $ */ +/* $NetBSD: md.c,v 1.57 2004/10/16 13:20:11 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -153,7 +153,8 @@ md_post_newfs(void) cp_to_target("/usr/mdec/boot.pmax", "/boot.pmax"); if (run_program(RUN_DISPLAY | RUN_NO_CLEAR, "/usr/sbin/installboot /dev/r%sc /usr/mdec/bootxx_ffs", diskdev)) - process_menu(MENU_ok, "Warning: disk is probably not bootable"); + process_menu(MENU_ok, + deconst("Warning: disk is probably not bootable")); return 0; } diff --git a/distrib/utils/sysinst/arch/x68k/md.c b/distrib/utils/sysinst/arch/x68k/md.c index 7d98bc2cfeac..09f4c9de98f2 100644 --- a/distrib/utils/sysinst/arch/x68k/md.c +++ b/distrib/utils/sysinst/arch/x68k/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.30 2004/08/14 16:06:43 dsl Exp $ */ +/* $NetBSD: md.c,v 1.31 2004/10/16 13:20:11 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -246,7 +246,8 @@ md_post_newfs(void) if (run_program(RUN_DISPLAY | RUN_NO_CLEAR, "/usr/mdec/installboot.new /usr/mdec/sdboot_ufs /dev/r%sa", diskdev)) - process_menu(MENU_ok, "Warning: disk is probably not bootable"); + process_menu(MENU_ok, + deconst("Warning: disk is probably not bootable")); return 0; } diff --git a/distrib/utils/sysinst/disks.c b/distrib/utils/sysinst/disks.c index 652fe02c4d0f..1061658c9c1a 100644 --- a/distrib/utils/sysinst/disks.c +++ b/distrib/utils/sysinst/disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.86 2004/05/18 14:07:06 cube Exp $ */ +/* $NetBSD: disks.c,v 1.87 2004/10/16 13:20:10 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -624,7 +624,6 @@ mount_disks(void) { char *fstab; int fstabsize; - int i; int error; static struct lookfor fstabbuf[] = { diff --git a/distrib/utils/sysinst/label.c b/distrib/utils/sysinst/label.c index 2abb4d227304..d4a4e468026f 100644 --- a/distrib/utils/sysinst/label.c +++ b/distrib/utils/sysinst/label.c @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.44 2004/08/14 16:06:36 dsl Exp $ */ +/* $NetBSD: label.c,v 1.45 2004/10/16 13:20:11 dsl Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.44 2004/08/14 16:06:36 dsl Exp $"); +__RCSID("$NetBSD: label.c,v 1.45 2004/10/16 13:20:11 dsl Exp $"); #endif #include @@ -272,7 +272,6 @@ static int edit_fs_mountpt(menudesc *m, void *arg) { partinfo *p = arg; - char buff[4]; msg_prompt_win(MSG_mountpoint, -1, 18, 0, 0, p->pi_mount, p->pi_mount, sizeof p->pi_mount); diff --git a/distrib/utils/sysinst/mbr.c b/distrib/utils/sysinst/mbr.c index 285017c61b90..23e2f210a00e 100644 --- a/distrib/utils/sysinst/mbr.c +++ b/distrib/utils/sysinst/mbr.c @@ -1,4 +1,4 @@ -/* $NetBSD: mbr.c,v 1.64 2004/08/14 16:06:36 dsl Exp $ */ +/* $NetBSD: mbr.c,v 1.65 2004/10/16 13:20:11 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1513,7 +1513,10 @@ write_mbr(const char *disk, mbr_info_t *mbri, int convert) int fd, i, ret = 0; struct mbr_partition *mbrp; u_int32_t pstart, psize; - struct mbr_sector *mbrs, mbrsec; +#ifdef BOOTSEL + struct mbr_sector *mbrs; +#endif + struct mbr_sector mbrsec; mbr_info_t *ext; uint sector; diff --git a/distrib/utils/sysinst/wskbd.c b/distrib/utils/sysinst/wskbd.c index 62aa6ec2c0bc..0495cf98345e 100644 --- a/distrib/utils/sysinst/wskbd.c +++ b/distrib/utils/sysinst/wskbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wskbd.c,v 1.1 2004/06/12 19:18:24 dsl Exp $ */ +/* $NetBSD: wskbd.c,v 1.2 2004/10/16 13:20:11 dsl Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -33,11 +33,12 @@ */ #include -__RCSID("$NetBSD: wskbd.c,v 1.1 2004/06/12 19:18:24 dsl Exp $"); +__RCSID("$NetBSD: wskbd.c,v 1.2 2004/10/16 13:20:11 dsl Exp $"); #include #include #include +#include #include #include