From 6b08710ee11d58fba7e8982f046f86f888c48dfa Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 15 Nov 2003 21:05:44 +0000 Subject: [PATCH] Misc cleanups to take care of GCC3.x warnings. Missing 'U' and 'LL' postfixes on large unsigned or 64 bit constants, non-storage structural declarations embedded in structures, deprecated use of __FUNCTION__, missing 'break' statements in the last switch case, goto label ops where the label occurs just before an end-brace (many of which appear to be fixable with 'break' or 'continue' instead and existed simply due to programmer-paranoia), garbage data in #endif lines that was not commented out. GCC3 also caught some argument count issues in kernel printfs. Many of these (obvious) fixes are similar to or copied from 5.x. Also fix a few other minor issues such as certain drivers declaring a proc pointer instead of a thread pointer. Move -ffreestanding from CWARNFLAGS to CFLAGS. It doesn't belong in CWARNFLAGS. --- sys/bus/firewire/fwohcireg.h | 68 +++++++++++++------------ sys/bus/ppbus/ppb_msq.c | 8 +-- sys/conf/bsd.kern.mk | 8 ++- sys/contrib/dev/acpica/actypes.h | 8 +-- sys/cpu/i386/include/db_machdep.h | 3 +- sys/ddb/db_run.c | 6 +-- sys/dev/acpica/acpi_thermal.c | 4 +- sys/dev/disk/aha/aha.c | 11 +++- sys/dev/disk/aic7xxx/ahc_pci.c | 4 +- sys/dev/disk/aic7xxx/ahd_pci.c | 4 +- sys/dev/disk/ata/atapi-fd.c | 4 +- sys/dev/disk/ncr/ncr.c | 7 +-- sys/dev/misc/pccard/pccarddevs.h | 8 +-- sys/dev/misc/pcic/i82365var.h | 4 +- sys/dev/netif/ray/if_ray.c | 4 +- sys/dev/raid/asr/osd_util.h | 22 ++++---- sys/dev/raid/asr/sys_info.h | 8 +-- sys/dev/raid/twe/twe_freebsd.c | 3 +- sys/dev/raid/vinum/vinumioctl.c | 4 +- sys/dev/raid/vinum/vinumrevive.c | 3 +- sys/dev/raid/vinum/vinumstate.c | 3 +- sys/dev/sound/pcm/feeder.c | 12 ++--- sys/dev/sound/pcm/sound.c | 19 ++++--- sys/dev/usbmisc/umass/umass.c | 3 +- sys/dev/video/fb/bmp/splash_bmp.c | 4 +- sys/emulation/ibcs2/i386/ibcs2_sysvec.c | 4 +- sys/emulation/linux/linux_ioctl.c | 4 +- sys/emulation/svr4/svr4_misc.c | 5 +- sys/i386/i386/machdep.c | 3 +- sys/i386/include/db_machdep.h | 3 +- sys/i386/isa/clock.c | 4 +- sys/kern/subr_rman.c | 4 +- sys/netgraph/async/ng_async.c | 4 +- sys/netgraph/netgraph/ng_parse.c | 3 +- sys/netproto/smb/smb_subr.h | 3 +- sys/platform/pc32/i386/machdep.c | 3 +- sys/platform/pc32/isa/clock.c | 4 +- sys/sys/dvdio.h | 4 +- sys/sys/systm.h | 4 +- sys/vfs/hpfs/hpfs.h | 6 +-- sys/vfs/nfs/nfs_nqlease.c | 8 +-- sys/vfs/nfs/nfs_vfsops.c | 8 +-- sys/vfs/nfs/nfs_vnops.c | 47 +++++++++++------ sys/vfs/nfs/nfsm_subs.h | 8 +-- 44 files changed, 200 insertions(+), 161 deletions(-) diff --git a/sys/bus/firewire/fwohcireg.h b/sys/bus/firewire/fwohcireg.h index 6e411da9bd..1fed943b47 100644 --- a/sys/bus/firewire/fwohcireg.h +++ b/sys/bus/firewire/fwohcireg.h @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/firewire/fwohcireg.h,v 1.2.2.6 2003/04/28 03:29:18 simokawa Exp $ - * $DragonFly: src/sys/bus/firewire/fwohcireg.h,v 1.2 2003/06/17 04:28:25 dillon Exp $ + * $DragonFly: src/sys/bus/firewire/fwohcireg.h,v 1.3 2003/11/15 21:05:33 dillon Exp $ * */ #define PCI_CBMEM 0x10 @@ -171,6 +171,40 @@ struct fwohcidb { #define FWOHCIEV_MASK 0x1f +struct ohci_dma{ + fwohcireg_t cntl; + +#define OHCI_CNTL_CYCMATCH_S (0x1 << 31) + +#define OHCI_CNTL_BUFFIL (0x1 << 31) +#define OHCI_CNTL_ISOHDR (0x1 << 30) +#define OHCI_CNTL_CYCMATCH_R (0x1 << 29) +#define OHCI_CNTL_MULTICH (0x1 << 28) + +#define OHCI_CNTL_DMA_RUN (0x1 << 15) +#define OHCI_CNTL_DMA_WAKE (0x1 << 12) +#define OHCI_CNTL_DMA_DEAD (0x1 << 11) +#define OHCI_CNTL_DMA_ACTIVE (0x1 << 10) +#define OHCI_CNTL_DMA_BT (0x1 << 8) +#define OHCI_CNTL_DMA_BAD (0x1 << 7) +#define OHCI_CNTL_DMA_STAT (0xff) + + fwohcireg_t cntl_clr; + fwohcireg_t dummy0; + fwohcireg_t cmd; + fwohcireg_t match; + fwohcireg_t dummy1; + fwohcireg_t dummy2; + fwohcireg_t dummy3; +}; + +struct ohci_itdma{ + fwohcireg_t cntl; + fwohcireg_t cntl_clr; + fwohcireg_t dummy0; + fwohcireg_t cmd; +}; + struct ohci_registers { fwohcireg_t ver; /* Version No. 0x0 */ fwohcireg_t guid; /* GUID_ROM No. 0x4 */ @@ -262,32 +296,6 @@ struct ohci_registers { fwohcireg_t dummy7[23]; /* dummy 0x124-0x17c */ - struct ohci_dma{ - fwohcireg_t cntl; - -#define OHCI_CNTL_CYCMATCH_S (0x1 << 31) - -#define OHCI_CNTL_BUFFIL (0x1 << 31) -#define OHCI_CNTL_ISOHDR (0x1 << 30) -#define OHCI_CNTL_CYCMATCH_R (0x1 << 29) -#define OHCI_CNTL_MULTICH (0x1 << 28) - -#define OHCI_CNTL_DMA_RUN (0x1 << 15) -#define OHCI_CNTL_DMA_WAKE (0x1 << 12) -#define OHCI_CNTL_DMA_DEAD (0x1 << 11) -#define OHCI_CNTL_DMA_ACTIVE (0x1 << 10) -#define OHCI_CNTL_DMA_BT (0x1 << 8) -#define OHCI_CNTL_DMA_BAD (0x1 << 7) -#define OHCI_CNTL_DMA_STAT (0xff) - - fwohcireg_t cntl_clr; - fwohcireg_t dummy0; - fwohcireg_t cmd; - fwohcireg_t match; - fwohcireg_t dummy1; - fwohcireg_t dummy2; - fwohcireg_t dummy3; - }; /* 0x180, 0x184, 0x188, 0x18c */ /* 0x190, 0x194, 0x198, 0x19c */ /* 0x1a0, 0x1a4, 0x1a8, 0x1ac */ @@ -300,12 +308,6 @@ struct ohci_registers { /* 0x200, 0x204, 0x208, 0x20c */ /* 0x210, 0x204, 0x208, 0x20c */ - struct ohci_itdma{ - fwohcireg_t cntl; - fwohcireg_t cntl_clr; - fwohcireg_t dummy0; - fwohcireg_t cmd; - }; struct ohci_itdma dma_itch[0x20]; /* 0x400, 0x404, 0x408, 0x40c */ diff --git a/sys/bus/ppbus/ppb_msq.c b/sys/bus/ppbus/ppb_msq.c index 52f51a4ecb..aef54b7daa 100644 --- a/sys/bus/ppbus/ppb_msq.c +++ b/sys/bus/ppbus/ppb_msq.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/ppb_msq.c,v 1.9.2.1 2000/05/24 00:20:57 n_hibma Exp $ - * $DragonFly: src/sys/bus/ppbus/ppb_msq.c,v 1.4 2003/11/09 02:22:33 dillon Exp $ + * $DragonFly: src/sys/bus/ppbus/ppb_msq.c,v 1.5 2003/11/15 21:05:38 dillon Exp $ * */ #include @@ -287,9 +287,10 @@ ppb_MS_microseq(device_t bus, device_t dev, struct ppb_microseq *msq, int *ret) goto error; INCR_PC; - goto next; - } else + continue; + } else { panic("%s: IEEE1284 read not supported", __FUNCTION__); + } } /* XXX should use ppb_MS_init_msq() */ @@ -329,7 +330,6 @@ ppb_MS_microseq(device_t bus, device_t dev, struct ppb_microseq *msq, int *ret) goto error; break; } - next: } error: return (error); diff --git a/sys/conf/bsd.kern.mk b/sys/conf/bsd.kern.mk index 8fb3095606..4c1ed36de1 100644 --- a/sys/conf/bsd.kern.mk +++ b/sys/conf/bsd.kern.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.kern.mk,v 1.17.2.1 2001/08/01 16:56:56 obrien Exp $ -# $DragonFly: src/sys/conf/bsd.kern.mk,v 1.1 2003/11/15 19:01:27 dillon Exp $ +# $DragonFly: src/sys/conf/bsd.kern.mk,v 1.2 2003/11/15 21:05:40 dillon Exp $ # # Warning flags for compiling the kernel and components of the kernel. @@ -10,7 +10,7 @@ # CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -fformat-extensions -ffreestanding -ansi + -fformat-extensions -ansi # # The following flags are next up for working on: # -W @@ -39,3 +39,7 @@ CFLAGS+= -mpreferred-stack-boundary=2 .if ${MACHINE_ARCH} == "alpha" CFLAGS+= -mno-fp-regs -Wa,-mev56 .endif + +# Prevent GCC 3.x from making certain libc based inline optimizations +# +CFLAGS+= -ffreestanding diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h index d80acfd01a..0dffa1b8a2 100644 --- a/sys/contrib/dev/acpica/actypes.h +++ b/sys/contrib/dev/acpica/actypes.h @@ -113,7 +113,7 @@ * such license, approval or letter. * *****************************************************************************/ -/* $DragonFly: src/sys/contrib/dev/acpica/Attic/actypes.h,v 1.1 2003/09/24 03:32:15 drhodus Exp $ */ +/* $DragonFly: src/sys/contrib/dev/acpica/Attic/actypes.h,v 1.2 2003/11/15 21:05:40 dillon Exp $ */ #ifndef __ACTYPES_H__ #define __ACTYPES_H__ @@ -127,8 +127,8 @@ */ #define ACPI_UINT8_MAX (UINT8) 0xFF #define ACPI_UINT16_MAX (UINT16) 0xFFFF -#define ACPI_UINT32_MAX (UINT32) 0xFFFFFFFF -#define ACPI_UINT64_MAX (UINT64) 0xFFFFFFFFFFFFFFFF +#define ACPI_UINT32_MAX (UINT32) 0xFFFFFFFFU +#define ACPI_UINT64_MAX (UINT64) 0xFFFFFFFFFFFFFFFFULL #define ACPI_ASCII_MAX 0x7F @@ -395,7 +395,7 @@ typedef UINT32 ACPI_INTEGER; typedef UINT64 ACPI_INTEGER; #define ACPI_INTEGER_MAX ACPI_UINT64_MAX #define ACPI_INTEGER_BIT_SIZE 64 -#define ACPI_MAX_BCD_VALUE 9999999999999999 +#define ACPI_MAX_BCD_VALUE 9999999999999999LL #define ACPI_MAX_BCD_DIGITS 16 #define ACPI_MAX_DECIMAL_DIGITS 19 diff --git a/sys/cpu/i386/include/db_machdep.h b/sys/cpu/i386/include/db_machdep.h index d7438230d8..ccdc9f53da 100644 --- a/sys/cpu/i386/include/db_machdep.h +++ b/sys/cpu/i386/include/db_machdep.h @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * $FreeBSD: src/sys/i386/include/db_machdep.h,v 1.16 1999/10/04 13:55:35 marcel Exp $ - * $DragonFly: src/sys/cpu/i386/include/db_machdep.h,v 1.6 2003/11/09 02:22:35 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/db_machdep.h,v 1.7 2003/11/15 21:05:43 dillon Exp $ */ #ifndef _MACHINE_DB_MACHDEP_H_ @@ -48,6 +48,7 @@ extern db_regs_t ddb_regs; /* register state */ extern db_addr_t PC_REGS(db_regs_t *regs); extern db_addr_t SP_REGS(db_regs_t *regs); +extern db_addr_t BP_REGS(db_regs_t *regs); #endif #define BKPT_INST 0xcc /* breakpoint instruction */ diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index caafb152bc..2e672d9005 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -24,7 +24,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_run.c,v 1.18 1999/08/28 00:41:10 peter Exp $ - * $DragonFly: src/sys/ddb/db_run.c,v 1.5 2003/11/08 03:06:53 dillon Exp $ + * $DragonFly: src/sys/ddb/db_run.c,v 1.6 2003/11/15 21:05:40 dillon Exp $ */ /* @@ -196,7 +196,7 @@ db_restart_at_pc(watchpt) db_load_count += inst_load(ins); db_store_count += inst_store(ins); } -#endif SOFTWARE_SSTEP +#endif /* SOFTWARE_SSTEP */ } if (db_run_mode == STEP_CONTINUE) { @@ -298,7 +298,7 @@ db_clear_single_step(regs) } } -#endif SOFTWARE_SSTEP +#endif /* SOFTWARE_SSTEP */ extern int db_cmd_loop_done; diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c index 25d57269e8..09b46c8b09 100644 --- a/sys/dev/acpica/acpi_thermal.c +++ b/sys/dev/acpica/acpi_thermal.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.29.6.1 2003/08/22 20:49:20 jhb Exp $ - * $DragonFly: src/sys/dev/acpica/Attic/acpi_thermal.c,v 1.1 2003/09/24 03:32:16 drhodus Exp $ + * $DragonFly: src/sys/dev/acpica/Attic/acpi_thermal.c,v 1.2 2003/11/15 21:05:40 dillon Exp $ */ #include "opt_acpi.h" @@ -112,7 +112,7 @@ static void acpi_tz_timeout(struct acpi_tz_softc *sc); static void acpi_tz_power_profile(void *arg); static void acpi_tz_thread(void *arg); -static struct proc *acpi_tz_proc; +static struct thread *acpi_tz_proc; static device_method_t acpi_tz_methods[] = { /* Device interface */ diff --git a/sys/dev/disk/aha/aha.c b/sys/dev/disk/aha/aha.c index d28dd2183e..5b264430cb 100644 --- a/sys/dev/disk/aha/aha.c +++ b/sys/dev/disk/aha/aha.c @@ -56,7 +56,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aha/aha.c,v 1.34.2.1 2000/08/02 22:24:39 peter Exp $ - * $DragonFly: src/sys/dev/disk/aha/aha.c,v 1.4 2003/08/07 21:16:50 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aha/aha.c,v 1.5 2003/11/15 21:05:41 dillon Exp $ */ #include @@ -262,25 +262,34 @@ aha_free(struct aha_softc *aha) } bus_dma_tag_destroy(aha->sg_dmat); } + /* fall through */ case 7: bus_dmamap_unload(aha->ccb_dmat, aha->ccb_dmamap); + /* fall through */ case 6: bus_dmamap_destroy(aha->ccb_dmat, aha->ccb_dmamap); bus_dmamem_free(aha->ccb_dmat, aha->aha_ccb_array, aha->ccb_dmamap); + /* fall through */ case 5: bus_dma_tag_destroy(aha->ccb_dmat); + /* fall through */ case 4: bus_dmamap_unload(aha->mailbox_dmat, aha->mailbox_dmamap); + /* fall through */ case 3: bus_dmamem_free(aha->mailbox_dmat, aha->in_boxes, aha->mailbox_dmamap); bus_dmamap_destroy(aha->mailbox_dmat, aha->mailbox_dmamap); + /* fall through */ case 2: bus_dma_tag_destroy(aha->buffer_dmat); + /* fall through */ case 1: bus_dma_tag_destroy(aha->mailbox_dmat); + /* fall through */ case 0: + break; } if (aha->unit != AHA_TEMP_UNIT) { aha_softcs[aha->unit] = NULL; diff --git a/sys/dev/disk/aic7xxx/ahc_pci.c b/sys/dev/disk/aic7xxx/ahc_pci.c index 780b592579..f616aee58d 100644 --- a/sys/dev/disk/aic7xxx/ahc_pci.c +++ b/sys/dev/disk/aic7xxx/ahc_pci.c @@ -31,7 +31,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_pci.c#13 $ * * $FreeBSD: src/sys/dev/aic7xxx/ahc_pci.c,v 1.29.2.14 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_pci.c,v 1.3 2003/08/07 21:16:51 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_pci.c,v 1.4 2003/11/15 21:05:41 dillon Exp $ */ #include "aic7xxx_osm.h" @@ -113,7 +113,7 @@ ahc_pci_attach(device_t dev) error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0, (ahc->flags & AHC_39BIT_ADDRESSING) - ? 0x7FFFFFFFFF + ? 0x7FFFFFFFFFULL : BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, diff --git a/sys/dev/disk/aic7xxx/ahd_pci.c b/sys/dev/disk/aic7xxx/ahd_pci.c index c516e9c317..159c211f06 100644 --- a/sys/dev/disk/aic7xxx/ahd_pci.c +++ b/sys/dev/disk/aic7xxx/ahd_pci.c @@ -31,7 +31,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahd_pci.c#13 $ * * $FreeBSD: src/sys/dev/aic7xxx/ahd_pci.c,v 1.2.2.5 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/ahd_pci.c,v 1.3 2003/08/07 21:16:51 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/ahd_pci.c,v 1.4 2003/11/15 21:05:41 dillon Exp $ */ #include "aic79xx_osm.h" @@ -116,7 +116,7 @@ ahd_pci_attach(device_t dev) error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0, (ahd->flags & AHD_39BIT_ADDRESSING) - ? 0x7FFFFFFFFF + ? 0x7FFFFFFFFFULL : BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, diff --git a/sys/dev/disk/ata/atapi-fd.c b/sys/dev/disk/ata/atapi-fd.c index 83792206b5..aca7f50d05 100644 --- a/sys/dev/disk/ata/atapi-fd.c +++ b/sys/dev/disk/ata/atapi-fd.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-fd.c,v 1.44.2.9 2002/07/31 11:19:26 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-fd.c,v 1.7 2003/08/07 21:16:51 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-fd.c,v 1.8 2003/11/15 21:05:41 dillon Exp $ */ #include @@ -196,7 +196,7 @@ afd_describe(struct afd_softc *fdp) fdp->cap.cylinders * fdp->cap.heads * fdp->cap.sectors, fdp->cap.cylinders, fdp->cap.heads, fdp->cap.sectors, fdp->cap.sector_size); - ata_prtdev(fdp->device, "%dKB/s,", fdp->lun, fdp->cap.transfer_rate/8); + ata_prtdev(fdp->device, "%dKB/s,", fdp->cap.transfer_rate / 8); printf(" %s\n", ata_mode2str(fdp->device->mode)); if (fdp->cap.medium_type) { ata_prtdev(fdp->device, "Medium: "); diff --git a/sys/dev/disk/ncr/ncr.c b/sys/dev/disk/ncr/ncr.c index 3a9f108933..31052ca5a0 100644 --- a/sys/dev/disk/ncr/ncr.c +++ b/sys/dev/disk/ncr/ncr.c @@ -1,7 +1,7 @@ /************************************************************************** ** ** $FreeBSD: src/sys/pci/ncr.c,v 1.155.2.3 2001/03/05 13:09:10 obrien Exp $ -** $DragonFly: src/sys/dev/disk/ncr/ncr.c,v 1.4 2003/08/07 21:16:53 dillon Exp $ +** $DragonFly: src/sys/dev/disk/ncr/ncr.c,v 1.5 2003/11/15 21:05:41 dillon Exp $ ** ** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family. ** @@ -3884,7 +3884,7 @@ ncr_action (struct cam_sim *sim, union ccb *ccb) int segments; u_int8_t nego; u_int8_t idmsg; - u_int8_t qidx; + int qidx; tp = &np->target[ccb->ccb_h.target_id]; csio = &ccb->csio; @@ -4158,7 +4158,8 @@ ncr_action (struct cam_sim *sim, union ccb *ccb) */ qidx = np->squeueput + 1; - if (qidx >= MAX_START) qidx=0; + if (qidx >= MAX_START) + qidx = 0; np->squeue [qidx ] = NCB_SCRIPT_PHYS (np, idle); np->squeue [np->squeueput] = CCB_PHYS (cp, phys); np->squeueput = qidx; diff --git a/sys/dev/misc/pccard/pccarddevs.h b/sys/dev/misc/pccard/pccarddevs.h index 4a134a8b68..d2f3b49dd6 100644 --- a/sys/dev/misc/pccard/pccarddevs.h +++ b/sys/dev/misc/pccard/pccarddevs.h @@ -1,5 +1,8 @@ -/* $FreeBSD: src/sys/dev/pccard/pccarddevs.h,v 1.3.2.1 2000/05/23 03:57:00 imp Exp $ */ -/* $DragonFly: src/sys/dev/misc/pccard/Attic/pccarddevs.h,v 1.2 2003/06/17 04:28:29 dillon Exp $ */ +/* + * $NetBSD: pcmciadevs,v 1.85 2000/03/22 21:39:57 mycroft Exp $ + * $FreeBSD: src/sys/dev/pccard/pccarddevs.h,v 1.3.2.1 2000/05/23 03:57:00 imp Exp $ + * $DragonFly: src/sys/dev/misc/pccard/Attic/pccarddevs.h,v 1.3 2003/11/15 21:05:41 dillon Exp $ + */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. @@ -7,7 +10,6 @@ * generated from: * FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.3 1999/11/29 20:53:36 imp Exp */ -/* $NetBSD: pcmciadevs,v 1.85 2000/03/22 21:39:57 mycroft Exp $ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. diff --git a/sys/dev/misc/pcic/i82365var.h b/sys/dev/misc/pcic/i82365var.h index d1eb8ab516..732f51d1c8 100644 --- a/sys/dev/misc/pcic/i82365var.h +++ b/sys/dev/misc/pcic/i82365var.h @@ -1,6 +1,6 @@ /* $NetBSD: i82365var.h,v 1.8 1999/10/15 06:07:27 haya Exp $ */ /* $FreeBSD: src/sys/dev/pcic/i82365var.h,v 1.15.2.1 2000/05/23 03:57:02 imp Exp $ */ -/* $DragonFly: src/sys/dev/misc/pcic/Attic/i82365var.h,v 1.4 2003/08/15 08:32:29 dillon Exp $ */ +/* $DragonFly: src/sys/dev/misc/pcic/Attic/i82365var.h,v 1.5 2003/11/15 21:05:41 dillon Exp $ */ /* * Copyright (c) 1997 Marc Horowitz. All rights reserved. @@ -65,7 +65,7 @@ struct pcic_handle { int ih_irq; int shutdown; - struct proc *event_thread; + struct thread *event_thread; STAILQ_HEAD(, pcic_event) events; }; diff --git a/sys/dev/netif/ray/if_ray.c b/sys/dev/netif/ray/if_ray.c index 61e02ec417..8ff839706e 100644 --- a/sys/dev/netif/ray/if_ray.c +++ b/sys/dev/netif/ray/if_ray.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ray/if_ray.c,v 1.47.2.4 2001/08/14 22:54:05 dmlb Exp $ - * $DragonFly: src/sys/dev/netif/ray/Attic/if_ray.c,v 1.5 2003/11/12 22:08:06 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ray/Attic/if_ray.c,v 1.6 2003/11/15 21:05:41 dillon Exp $ * */ @@ -2290,7 +2290,7 @@ ray_rx_mgt_info(struct ray_softc *sc, struct mbuf *m0, struct ieee80211_informat RAY_DPRINTF(sc, RAY_DBG_MGT, "tim pvt[%03d]\t0x%02x", i-5, bp[i]); } -#endif (RAY_DEBUG & RAY_DBG_MGT) +#endif break; case IEEE80211_ELEMID_IBSSPARMS: diff --git a/sys/dev/raid/asr/osd_util.h b/sys/dev/raid/asr/osd_util.h index f3722c95e7..3e71c7a90b 100644 --- a/sys/dev/raid/asr/osd_util.h +++ b/sys/dev/raid/asr/osd_util.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/asr/osd_util.h,v 1.1.2.2 2001/08/23 05:21:29 scottl Exp $ */ -/* $DragonFly: src/sys/dev/raid/asr/osd_util.h,v 1.3 2003/08/07 21:17:08 dillon Exp $ */ +/* $DragonFly: src/sys/dev/raid/asr/osd_util.h,v 1.4 2003/11/15 21:05:41 dillon Exp $ */ /* * Copyright (c) 1996-1999 Distributed Processing Technology Corporation * All rights reserved. @@ -220,12 +220,12 @@ /* Reverses the byte ordering of a 2 byte variable */ #if (!defined(osdSwap2)) uSHORT osdSwap2(DPT_UNALIGNED uSHORT *); -#endif // !osdSwap2 +#endif /* !osdSwap2 */ /* Reverses the byte ordering of a 4 byte variable and shifts left 8 bits */ #if (!defined(osdSwap3)) uLONG osdSwap3(DPT_UNALIGNED uLONG *); -#endif // !osdSwap3 +#endif /* !osdSwap3 */ #ifdef _DPT_NETWARE @@ -237,12 +237,12 @@ } #else #define osdSwap4(inLong) DPT_Bswapl(inLong) - #endif // cplusplus + #endif /* cplusplus */ #else /* Reverses the byte ordering of a 4 byte variable */ # if (!defined(osdSwap4)) uLONG osdSwap4(DPT_UNALIGNED uLONG *); -# endif // !osdSwap4 +# endif /* !osdSwap4 */ /* The following functions ALWAYS swap regardless of the * * presence of DPT_BIG_ENDIAN */ @@ -250,7 +250,7 @@ uSHORT trueSwap2(DPT_UNALIGNED uSHORT *); uLONG trueSwap4(DPT_UNALIGNED uLONG *); -#endif // netware +#endif /* netware */ /*-------------------------------------* @@ -274,11 +274,11 @@ uLONG netSwap4(uLONG val); #ifndef NET_SWAP_2 #define NET_SWAP_2(x) (((x) >> 8) | ((x) << 8)) -#endif // NET_SWAP_2 +#endif #ifndef NET_SWAP_4 #define NET_SWAP_4(x) netSwap4((x)) -#endif // NET_SWAP_4 +#endif #else @@ -286,13 +286,13 @@ uLONG netSwap4(uLONG val); #ifndef NET_SWAP_2 #define NET_SWAP_2(x) (x) -#endif // NET_SWAP_2 +#endif #ifndef NET_SWAP_4 #define NET_SWAP_4(x) (x) -#endif // NET_SWAP_4 +#endif -#endif // big endian +#endif /* big endian */ diff --git a/sys/dev/raid/asr/sys_info.h b/sys/dev/raid/asr/sys_info.h index 31bd51750f..325f823164 100644 --- a/sys/dev/raid/asr/sys_info.h +++ b/sys/dev/raid/asr/sys_info.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/asr/sys_info.h,v 1.1.2.2 2001/08/23 05:21:29 scottl Exp $ */ -/* $DragonFly: src/sys/dev/raid/asr/sys_info.h,v 1.3 2003/08/07 21:17:08 dillon Exp $ */ +/* $DragonFly: src/sys/dev/raid/asr/sys_info.h,v 1.4 2003/11/15 21:05:41 dillon Exp $ */ /* * Copyright (c) 1996-1999 Distributed Processing Technology Corporation * All rights reserved. @@ -70,7 +70,7 @@ #else #pragma pack(1) #endif /* aix */ -#endif // no unpack +#endif /* no unpack */ /*struct - driveParam_S - start @@ -99,7 +99,7 @@ #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); -#endif // DPT PORTABLE +#endif //-------------------------------------------- }; @@ -177,7 +177,7 @@ #ifdef DPT_PORTABLE uSHORT netInsert(dptBuffer_S *buffer); uSHORT netExtract(dptBuffer_S *buffer); -#endif // DPT PORTABLE +#endif //-------------------------------------------- }; diff --git a/sys/dev/raid/twe/twe_freebsd.c b/sys/dev/raid/twe/twe_freebsd.c index 3bf7eb4b6e..50a2d9df38 100644 --- a/sys/dev/raid/twe/twe_freebsd.c +++ b/sys/dev/raid/twe/twe_freebsd.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/twe/twe_freebsd.c,v 1.2.2.5 2002/03/07 09:57:02 msmith Exp $ - * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.6 2003/09/22 21:45:22 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.7 2003/11/15 21:05:42 dillon Exp $ */ /* @@ -950,6 +950,7 @@ twe_setup_data_dmamap(void *arg, bus_dma_segment_t *segs, int nsegments, int err break; default: /* no s/g list, nothing to do */ + break; } } diff --git a/sys/dev/raid/vinum/vinumioctl.c b/sys/dev/raid/vinum/vinumioctl.c index f0d5e09e75..359472e5c2 100644 --- a/sys/dev/raid/vinum/vinumioctl.c +++ b/sys/dev/raid/vinum/vinumioctl.c @@ -43,7 +43,7 @@ * * $Id: vinumioctl.c,v 1.14 2000/10/27 03:07:53 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumioctl.c,v 1.25.2.4 2002/02/03 00:44:19 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumioctl.c,v 1.4 2003/08/07 21:17:09 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumioctl.c,v 1.5 2003/11/15 21:05:42 dillon Exp $ */ #include "vinumhdr.h" @@ -304,9 +304,9 @@ vinumioctl(dev_t dev, u_long cmd, caddr_t data, int flag, d_thread_t *td) case VINUM_MOVE: moveobject((struct vinum_ioctl_msg *) data); return 0; - default: /* FALLTHROUGH */ + break; } case VINUM_DRIVE_TYPE: diff --git a/sys/dev/raid/vinum/vinumrevive.c b/sys/dev/raid/vinum/vinumrevive.c index 82c71a2c9e..9d2f97f6e7 100644 --- a/sys/dev/raid/vinum/vinumrevive.c +++ b/sys/dev/raid/vinum/vinumrevive.c @@ -39,7 +39,7 @@ * * $Id: vinumrevive.c,v 1.14 2000/12/21 01:55:11 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumrevive.c,v 1.22.2.5 2001/03/13 02:59:43 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumrevive.c,v 1.3 2003/08/07 21:17:09 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumrevive.c,v 1.4 2003/11/15 21:05:42 dillon Exp $ */ #include "vinumhdr.h" @@ -132,6 +132,7 @@ revive_block(int sdno) break; case plex_disorg: /* to keep the compiler happy */ + break; } if (paritysd) { /* we're reviving a parity block, */ diff --git a/sys/dev/raid/vinum/vinumstate.c b/sys/dev/raid/vinum/vinumstate.c index e3cf425b3f..953728fcee 100644 --- a/sys/dev/raid/vinum/vinumstate.c +++ b/sys/dev/raid/vinum/vinumstate.c @@ -39,7 +39,7 @@ * * $Id: vinumstate.c,v 2.18 2000/05/10 07:30:50 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumstate.c,v 1.28.2.2 2000/06/08 02:00:23 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumstate.c,v 1.3 2003/08/07 21:17:10 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumstate.c,v 1.4 2003/11/15 21:05:42 dillon Exp $ */ #include "vinumhdr.h" @@ -1086,6 +1086,7 @@ setstate_by_force(struct vinum_ioctl_msg *msg) break; default: + break; } ioctl_reply->error = 0; } diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 3f5a5284e1..91d8afa6c0 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -24,14 +24,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/feeder.c,v 1.8.2.9 2003/02/08 01:43:07 orion Exp $ - * $DragonFly: src/sys/dev/sound/pcm/feeder.c,v 1.2 2003/06/17 04:28:31 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/feeder.c,v 1.3 2003/11/15 21:05:42 dillon Exp $ */ #include #include "feeder_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/feeder.c,v 1.2 2003/06/17 04:28:31 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/feeder.c,v 1.3 2003/11/15 21:05:42 dillon Exp $"); MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); @@ -64,8 +64,7 @@ feeder_register(void *p) SLIST_INIT(&feedertab); fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); if (fte == NULL) { - printf("can't allocate memory for root feeder\n", fc->name); - + printf("can't allocate memory for root feeder\n"); return; } fte->feederclass = fc; @@ -276,9 +275,9 @@ feeder_fmtchain(u_int32_t *to, struct pcm_feeder *source, struct pcm_feeder *sto SLIST_FOREACH(fte, &feedertab, link) { if (fte->desc == NULL) - goto no; + continue; if (fte->desc->type != FEEDER_FMT) - goto no; + continue; if (fte->desc->in == source->desc->out) { try = feeder_create(fte->feederclass, fte->desc); if (try) { @@ -289,7 +288,6 @@ feeder_fmtchain(u_int32_t *to, struct pcm_feeder *source, struct pcm_feeder *sto feeder_destroy(try); } } -no: } /* printf("giving up %s...\n", source->class->name); */ diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 382b7074d4..71512feb14 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/sound.c,v 1.17.2.14 2002/11/07 23:17:18 cognet Exp $ - * $DragonFly: src/sys/dev/sound/pcm/sound.c,v 1.2 2003/06/17 04:28:31 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/sound.c,v 1.3 2003/11/15 21:05:42 dillon Exp $ */ #include @@ -34,7 +34,7 @@ #include "feeder_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/sound.c,v 1.2 2003/06/17 04:28:31 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/sound.c,v 1.3 2003/11/15 21:05:42 dillon Exp $"); struct snddev_channel { SLIST_ENTRY(snddev_channel) link; @@ -283,10 +283,9 @@ pcm_setmaxautovchans(struct snddev_info *d, int num) err = vchan_destroy(c); if (err) device_printf(d->dev, "vchan_destroy(%s) == %d\n", c->name, err); - goto restart; + break; } } -restart: } } } @@ -791,9 +790,10 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) } sbuf_printf(s, "{%s}", (c->direction == PCMDIR_REC)? "userland" : "hardware"); } -skipverbose: - } else + } else { sbuf_printf(s, " (mixer only)"); + } +skipverbose: snd_mtxunlock(d->lock); return 0; @@ -835,13 +835,13 @@ sysctl_hw_snd_vchans(SYSCTL_HANDLER_ARGS) c = sce->channel; /* not a candidate if not a play channel */ if (c->direction != PCMDIR_PLAY) - goto addskip; + continue; /* not a candidate if a virtual channel */ if (c->flags & CHN_F_VIRTUAL) - goto addskip; + continue; /* not a candidate if it's in use */ if ((c->flags & CHN_F_BUSY) && (SLIST_EMPTY(&c->children))) - goto addskip; + continue; /* * if we get here we're a nonvirtual play channel, and either * 1) not busy @@ -850,7 +850,6 @@ sysctl_hw_snd_vchans(SYSCTL_HANDLER_ARGS) * thus we can add children */ goto addok; -addskip: } pcm_unlock(d); return EBUSY; diff --git a/sys/dev/usbmisc/umass/umass.c b/sys/dev/usbmisc/umass/umass.c index 9082d24856..523a8b116a 100644 --- a/sys/dev/usbmisc/umass/umass.c +++ b/sys/dev/usbmisc/umass/umass.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/usb/umass.c,v 1.11.2.19 2003/05/17 21:45:27 njl Exp $ - * $DragonFly: src/sys/dev/usbmisc/umass/umass.c,v 1.3 2003/08/07 21:17:14 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/umass/umass.c,v 1.4 2003/11/15 21:05:42 dillon Exp $ * $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $ */ @@ -2256,6 +2256,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) break; default: /* XXX Hm, we should check the input parameters */ + break; } /* Perform the requested action */ diff --git a/sys/dev/video/fb/bmp/splash_bmp.c b/sys/dev/video/fb/bmp/splash_bmp.c index 6dacd0dccb..2549730194 100644 --- a/sys/dev/video/fb/bmp/splash_bmp.c +++ b/sys/dev/video/fb/bmp/splash_bmp.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/modules/splash/bmp/splash_bmp.c,v 1.10.2.3 2000/10/31 08:00:06 nyan Exp $ - * $DragonFly: src/sys/dev/video/fb/bmp/splash_bmp.c,v 1.4 2003/08/15 08:32:32 dillon Exp $ + * $DragonFly: src/sys/dev/video/fb/bmp/splash_bmp.c,v 1.5 2003/11/15 21:05:42 dillon Exp $ */ #include @@ -588,7 +588,9 @@ static int bmp_Draw(video_adapter_t *adp) { int line; +#if 0 int i; +#endif if (bmp_info.data == NULL) { /* init failed, do nothing */ return(1); diff --git a/sys/emulation/ibcs2/i386/ibcs2_sysvec.c b/sys/emulation/ibcs2/i386/ibcs2_sysvec.c index 9a373aa308..2f01ad53d1 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_sysvec.c +++ b/sys/emulation/ibcs2/i386/ibcs2_sysvec.c @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/ibcs2/ibcs2_sysvec.c,v 1.17.2.1 2001/02/22 05:15:01 marcel Exp $ - * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_sysvec.c,v 1.3 2003/08/07 21:17:17 dillon Exp $ + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_sysvec.c,v 1.4 2003/11/15 21:05:42 dillon Exp $ */ #include @@ -82,8 +82,10 @@ ibcs2_modevent(module_t mod, int type, void *unused) if (p->p_sysent == &ibcs2_svr3_sysvec) return EBUSY; } + /* fall through */ default: /* do not care */ + break; } return 0; } diff --git a/sys/emulation/linux/linux_ioctl.c b/sys/emulation/linux/linux_ioctl.c index 552261f066..7eaffc37f7 100644 --- a/sys/emulation/linux/linux_ioctl.c +++ b/sys/emulation/linux/linux_ioctl.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.55.2.11 2003/05/01 20:16:09 anholt Exp $ - * $DragonFly: src/sys/emulation/linux/linux_ioctl.c,v 1.10 2003/11/10 06:12:10 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_ioctl.c,v 1.11 2003/11/15 21:05:42 dillon Exp $ */ #include @@ -1581,7 +1581,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args) KKASSERT(p); KASSERT(LINUX_IFNAMSIZ == IFNAMSIZ, - (__FUNCTION__ "(): LINUX_IFNAMSIZ != IFNAMSIZ")); + ("%s(): LINUX_IFNAMSIZ != IFNAMSIZ", __FUNCTION__)); ifp = NULL; error = 0; diff --git a/sys/emulation/svr4/svr4_misc.c b/sys/emulation/svr4/svr4_misc.c index 20032bc876..c3a6c6fde4 100644 --- a/sys/emulation/svr4/svr4_misc.c +++ b/sys/emulation/svr4/svr4_misc.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/svr4/svr4_misc.c,v 1.13.2.7 2003/01/14 21:33:58 dillon Exp $ - * $DragonFly: src/sys/emulation/svr4/Attic/svr4_misc.c,v 1.18 2003/09/29 18:52:11 dillon Exp $ + * $DragonFly: src/sys/emulation/svr4/Attic/svr4_misc.c,v 1.19 2003/11/15 21:05:43 dillon Exp $ */ /* @@ -256,8 +256,7 @@ svr4_sys_getdents64(struct svr4_sys_getdents64_args *uap) KKASSERT(p); - DPRINTF(("svr4_sys_getdents64(%d, *, %d)\n", - p->p_pid, SCARG(uap, fd), SCARG(uap, nbytes))); + DPRINTF(("svr4_sys_getdents64(%d, *, %d)\n", uap->fd, uap->nbytes)); if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) { return (error); } diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 99e3686b39..ac12a6cfd3 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -36,7 +36,7 @@ * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.385.2.30 2003/05/31 08:48:05 alc Exp $ - * $DragonFly: src/sys/i386/i386/Attic/machdep.c,v 1.43 2003/11/05 23:26:18 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/machdep.c,v 1.44 2003/11/15 21:05:43 dillon Exp $ */ #include "use_apm.h" @@ -1326,6 +1326,7 @@ int15e820: physmap[physmap_idx] = smap->base; physmap[physmap_idx + 1] = smap->base + smap->length; next_run: + ; /* fix GCC3.x warning */ } while (vmf.vmf_ebx != 0); /* diff --git a/sys/i386/include/db_machdep.h b/sys/i386/include/db_machdep.h index 024c1d74b7..9d6af3545e 100644 --- a/sys/i386/include/db_machdep.h +++ b/sys/i386/include/db_machdep.h @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * $FreeBSD: src/sys/i386/include/db_machdep.h,v 1.16 1999/10/04 13:55:35 marcel Exp $ - * $DragonFly: src/sys/i386/include/Attic/db_machdep.h,v 1.6 2003/11/09 02:22:35 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/db_machdep.h,v 1.7 2003/11/15 21:05:43 dillon Exp $ */ #ifndef _MACHINE_DB_MACHDEP_H_ @@ -48,6 +48,7 @@ extern db_regs_t ddb_regs; /* register state */ extern db_addr_t PC_REGS(db_regs_t *regs); extern db_addr_t SP_REGS(db_regs_t *regs); +extern db_addr_t BP_REGS(db_regs_t *regs); #endif #define BKPT_INST 0xcc /* breakpoint instruction */ diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 134c509397..8c000e757f 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -35,7 +35,7 @@ * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/isa/clock.c,v 1.149.2.6 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/i386/isa/Attic/clock.c,v 1.6 2003/08/26 21:42:19 rob Exp $ + * $DragonFly: src/sys/i386/isa/Attic/clock.c,v 1.7 2003/11/15 21:05:43 dillon Exp $ */ /* @@ -1248,5 +1248,5 @@ _TSTMP(u_int32_t x) i = 0; tsc[i] = 0; /* mark last entry */ } -#endif KERN_TIMESTAMP +#endif /* KERN_TIMESTAMP */ diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 3ebda82f09..e0a49af179 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/subr_rman.c,v 1.10.2.1 2001/06/05 08:06:08 imp Exp $ - * $DragonFly: src/sys/kern/subr_rman.c,v 1.4 2003/07/19 21:14:38 dillon Exp $ + * $DragonFly: src/sys/kern/subr_rman.c,v 1.5 2003/11/15 21:05:43 dillon Exp $ */ /* @@ -201,7 +201,7 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count, if (CIRCLEQ_TERMCOND(r, rm->rm_list)) { #ifdef RMAN_DEBUG printf("could not find a region\n"); -#endif RMAN_DEBUG +#endif goto out; } diff --git a/sys/netgraph/async/ng_async.c b/sys/netgraph/async/ng_async.c index 5b57f172d8..2a751c855f 100644 --- a/sys/netgraph/async/ng_async.c +++ b/sys/netgraph/async/ng_async.c @@ -37,7 +37,7 @@ * Author: Archie Cobbs * * $FreeBSD: src/sys/netgraph/ng_async.c,v 1.6.2.5 2002/07/02 23:44:02 archie Exp $ - * $DragonFly: src/sys/netgraph/async/ng_async.c,v 1.4 2003/08/07 21:54:32 dillon Exp $ + * $DragonFly: src/sys/netgraph/async/ng_async.c,v 1.5 2003/11/15 21:05:43 dillon Exp $ * $Whistle: ng_async.c,v 1.17 1999/11/01 09:24:51 julian Exp $ */ @@ -364,7 +364,7 @@ nga_disconnect(hook_p hook) else panic(__FUNCTION__); if (!*hookp) - panic(__FUNCTION__ "2"); + panic("%s2", __FUNCTION__); *hookp = NULL; bzero(&sc->stats, sizeof(sc->stats)); sc->lasttime = 0; diff --git a/sys/netgraph/netgraph/ng_parse.c b/sys/netgraph/netgraph/ng_parse.c index 6c16ee9210..61066a5d42 100644 --- a/sys/netgraph/netgraph/ng_parse.c +++ b/sys/netgraph/netgraph/ng_parse.c @@ -38,7 +38,7 @@ * * $Whistle: ng_parse.c,v 1.3 1999/11/29 01:43:48 archie Exp $ * $FreeBSD: src/sys/netgraph/ng_parse.c,v 1.3.2.8 2002/07/02 23:44:02 archie Exp $ - * $DragonFly: src/sys/netgraph/netgraph/ng_parse.c,v 1.4 2003/08/07 21:54:32 dillon Exp $ + * $DragonFly: src/sys/netgraph/netgraph/ng_parse.c,v 1.5 2003/11/15 21:05:43 dillon Exp $ */ #include @@ -1122,6 +1122,7 @@ ng_parse_composite(const struct ng_parse_type *type, const char *s, nextIndex = index + 1; *off += len + len2; gotIndex: + ; /* avoid gcc3.x warning */ } else { /* a structure field */ const struct ng_parse_struct_field *const fields = type->info; diff --git a/sys/netproto/smb/smb_subr.h b/sys/netproto/smb/smb_subr.h index 32dd285a91..b48af387bd 100644 --- a/sys/netproto/smb/smb_subr.h +++ b/sys/netproto/smb/smb_subr.h @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netsmb/smb_subr.h,v 1.1.2.1 2001/05/22 08:32:34 bp Exp $ - * $DragonFly: src/sys/netproto/smb/smb_subr.h,v 1.6 2003/07/19 21:14:45 dillon Exp $ + * $DragonFly: src/sys/netproto/smb/smb_subr.h,v 1.7 2003/11/15 21:05:43 dillon Exp $ */ #ifndef _NETSMB_SMB_SUBR_H_ #define _NETSMB_SMB_SUBR_H_ @@ -46,7 +46,6 @@ MALLOC_DECLARE(M_SMBTEMP); /* * For compatibility with 5.x */ -#define MODULE_VERSION(name, ver) #define PDROP PUSRFLAG1 /* OR'd with pri to stop re-entry of interlock mutex */ #define SMBERROR(format, args...) printf("%s: "format, __FUNCTION__ ,## args) diff --git a/sys/platform/pc32/i386/machdep.c b/sys/platform/pc32/i386/machdep.c index 58ce14d65a..9cc4deeb10 100644 --- a/sys/platform/pc32/i386/machdep.c +++ b/sys/platform/pc32/i386/machdep.c @@ -36,7 +36,7 @@ * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.385.2.30 2003/05/31 08:48:05 alc Exp $ - * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.43 2003/11/05 23:26:18 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.44 2003/11/15 21:05:43 dillon Exp $ */ #include "use_apm.h" @@ -1326,6 +1326,7 @@ int15e820: physmap[physmap_idx] = smap->base; physmap[physmap_idx + 1] = smap->base + smap->length; next_run: + ; /* fix GCC3.x warning */ } while (vmf.vmf_ebx != 0); /* diff --git a/sys/platform/pc32/isa/clock.c b/sys/platform/pc32/isa/clock.c index e21dfbf91c..420bcde0a5 100644 --- a/sys/platform/pc32/isa/clock.c +++ b/sys/platform/pc32/isa/clock.c @@ -35,7 +35,7 @@ * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/isa/clock.c,v 1.149.2.6 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/isa/clock.c,v 1.6 2003/08/26 21:42:19 rob Exp $ + * $DragonFly: src/sys/platform/pc32/isa/clock.c,v 1.7 2003/11/15 21:05:43 dillon Exp $ */ /* @@ -1248,5 +1248,5 @@ _TSTMP(u_int32_t x) i = 0; tsc[i] = 0; /* mark last entry */ } -#endif KERN_TIMESTAMP +#endif /* KERN_TIMESTAMP */ diff --git a/sys/sys/dvdio.h b/sys/sys/dvdio.h index a6bbb5be20..335c55594d 100644 --- a/sys/sys/dvdio.h +++ b/sys/sys/dvdio.h @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/dvdio.h,v 1.2.2.2 2002/03/18 08:34:53 sos Exp $ - * $DragonFly: src/sys/sys/dvdio.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/dvdio.h,v 1.3 2003/11/15 21:05:43 dillon Exp $ */ #ifndef _SYS_DVDIO_H_ @@ -108,4 +108,4 @@ struct dvd_authinfo { #define DVDIOCSENDKEY _IOWR('c', 201, struct dvd_authinfo) #define DVDIOCREADSTRUCTURE _IOWR('c', 202, struct dvd_struct) -#endif _SYS_DVDIO_H_ +#endif /* _SYS_DVDIO_H_ */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 361540451a..6390287316 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -37,7 +37,7 @@ * * @(#)systm.h 8.7 (Berkeley) 3/29/95 * $FreeBSD: src/sys/sys/systm.h,v 1.111.2.18 2002/12/17 18:04:02 sam Exp $ - * $DragonFly: src/sys/sys/systm.h,v 1.15 2003/11/09 02:22:37 dillon Exp $ + * $DragonFly: src/sys/sys/systm.h,v 1.16 2003/11/15 21:05:43 dillon Exp $ */ #ifndef _SYS_SYSTM_H_ @@ -87,7 +87,7 @@ extern int ncpus; /* total number of cpus (real, hyper, virtual)*/ #ifdef INVARIANTS /* The option is always available */ #define KASSERT(exp,msg) do { if (!(exp)) panic msg; } while (0) -#define KKASSERT(exp) if (!(exp)) panic("assertion: " #exp " in " __FUNCTION__) +#define KKASSERT(exp) if (!(exp)) panic("assertion: " #exp " in %s", __FUNCTION__) #define SPLASSERT(level, msg) __CONCAT(__CONCAT(spl,level),assert)(msg) #define CONDSPLASSERT(cond, level, msg) do { \ if (cond) \ diff --git a/sys/vfs/hpfs/hpfs.h b/sys/vfs/hpfs/hpfs.h index ce7845a545..9de5f4dd40 100644 --- a/sys/vfs/hpfs/hpfs.h +++ b/sys/vfs/hpfs/hpfs.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs.h,v 1.1 1999/12/09 19:09:58 semenu Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs.h,v 1.7 2003/10/19 21:24:55 hmp Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs.h,v 1.8 2003/11/15 21:05:44 dillon Exp $ */ /*#define HPFS_DEBUG 10*/ @@ -45,7 +45,7 @@ typedef struct { #define BMSIZE (4 * DEV_BSIZE) #define HPFS_MAXFILENAME 255 -#define SU_MAGIC ((u_int64_t)0xFA53E9C5F995E849) +#define SU_MAGIC ((u_int64_t)0xFA53E9C5F995E849ULL) struct sublock { u_int64_t su_magic; u_int8_t su_hpfsver; @@ -66,7 +66,7 @@ struct sublock { lsn_t su_uidt; /* Ptr to User ID Table (8 sect) */ }; -#define SP_MAGIC ((u_int64_t)0xFA5229C5F9911849) +#define SP_MAGIC ((u_int64_t)0xFA5229C5F9911849ULL) #define SP_DIRTY 0x0001 #define SP_SPDBINUSE 0x0002 #define SP_HFINUSE 0x0004 diff --git a/sys/vfs/nfs/nfs_nqlease.c b/sys/vfs/nfs/nfs_nqlease.c index 9b5765be04..7f3a4b79da 100644 --- a/sys/vfs/nfs/nfs_nqlease.c +++ b/sys/vfs/nfs/nfs_nqlease.c @@ -35,7 +35,7 @@ * * @(#)nfs_nqlease.c 8.9 (Berkeley) 5/20/95 * $FreeBSD: src/sys/nfs/nfs_nqlease.c,v 1.50 2000/02/13 03:32:05 peter Exp $ - * $DragonFly: src/sys/vfs/nfs/Attic/nfs_nqlease.c,v 1.12 2003/10/10 22:01:13 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/Attic/nfs_nqlease.c,v 1.13 2003/11/15 21:05:44 dillon Exp $ */ @@ -881,9 +881,11 @@ nqnfs_getlease(struct vnode *vp, int rwflag, struct thread *td) frev = fxdr_hyper(tl); nqnfs_clientlease(nmp, np, rwflag, cachable, reqtime, frev); nfsm_loadattr(vp, (struct vattr *)0); - } else + } else { error = NQNFS_EXPIRED; - nfsm_reqdone; + } + m_freem(mrep); +nfsmout: return (error); } diff --git a/sys/vfs/nfs/nfs_vfsops.c b/sys/vfs/nfs/nfs_vfsops.c index 78257f9f9a..770faea690 100644 --- a/sys/vfs/nfs/nfs_vfsops.c +++ b/sys/vfs/nfs/nfs_vfsops.c @@ -35,7 +35,7 @@ * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 * $FreeBSD: src/sys/nfs/nfs_vfsops.c,v 1.91.2.7 2003/01/27 20:04:08 dillon Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_vfsops.c,v 1.9 2003/10/10 22:01:13 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_vfsops.c,v 1.10 2003/11/15 21:05:44 dillon Exp $ */ #include "opt_bootp.h" @@ -309,7 +309,8 @@ nfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN); bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN); } - nfsm_reqdone; + m_freem(mrep); +nfsmout: vput(vp); crfree(cred); return (error); @@ -371,7 +372,8 @@ nfs_fsinfo(struct nfsmount *nmp, struct vnode *vp, struct thread *td) nmp->nm_maxfilesize = maxfsize; nmp->nm_state |= NFSSTA_GOTFSINFO; } - nfsm_reqdone; + m_freem(mrep); +nfsmout: return (error); } diff --git a/sys/vfs/nfs/nfs_vnops.c b/sys/vfs/nfs/nfs_vnops.c index 1fac97642c..afc104a2df 100644 --- a/sys/vfs/nfs/nfs_vnops.c +++ b/sys/vfs/nfs/nfs_vnops.c @@ -35,7 +35,7 @@ * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 * $FreeBSD: src/sys/nfs/nfs_vnops.c,v 1.150.2.5 2001/12/20 19:56:28 dillon Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_vnops.c,v 1.14 2003/10/10 22:01:13 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_vnops.c,v 1.15 2003/11/15 21:05:44 dillon Exp $ */ @@ -303,7 +303,8 @@ nfs3_access_otw(struct vnode *vp, int wmode, np->n_modeuid = cred->cr_uid; np->n_modestamp = time_second; } - nfsm_reqdone; + m_freem(mrep); +nfsmout: return error; } @@ -667,7 +668,8 @@ nfs_getattr(ap) if (!error) { nfsm_loadattr(vp, ap->a_vap); } - nfsm_reqdone; + m_freem(mrep); +nfsmout: return (error); } @@ -819,7 +821,8 @@ nfs_setattrrpc(struct vnode *vp, struct vattr *vap, nfsm_wcc_data(vp, wccflag); } else nfsm_loadattr(vp, (struct vattr *)0); - nfsm_reqdone; + m_freem(mrep); +nfsmout: return (error); } @@ -997,7 +1000,8 @@ nfs_lookup(ap) cache_enter(dvp, NCPNULL, newvp, cnp); } *vpp = newvp; - nfsm_reqdone; + m_freem(mrep); +nfsmout: if (error) { if (newvp != NULLVP) { vrele(newvp); @@ -1086,7 +1090,8 @@ nfs_readlinkrpc(struct vnode *vp, struct uio *uiop) } nfsm_mtouio(uiop, len); } - nfsm_reqdone; + m_freem(mrep); +nfsmout: return (error); } @@ -1341,7 +1346,8 @@ nfs_mknodrpc(dvp, vpp, cnp, vap) } if (v3) nfsm_wcc_data(dvp, wccflag); - nfsm_reqdone; + m_freem(mrep); +nfsmout: if (error) { if (newvp) vput(newvp); @@ -1459,7 +1465,8 @@ again: } if (v3) nfsm_wcc_data(dvp, wccflag); - nfsm_reqdone; + m_freem(mrep); +nfsmout: if (error) { if (v3 && (fmode & O_EXCL) && error == NFSERR_NOTSUPP) { fmode &= ~O_EXCL; @@ -1610,7 +1617,8 @@ nfs_removerpc(dvp, name, namelen, cred, td) nfsm_request(dvp, NFSPROC_REMOVE, td, cred); if (v3) nfsm_wcc_data(dvp, wccflag); - nfsm_reqdone; + m_freem(mrep); +nfsmout: VTONFS(dvp)->n_flag |= NMODIFIED; if (!wccflag) VTONFS(dvp)->n_attrstamp = 0; @@ -1750,7 +1758,8 @@ nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, td) nfsm_wcc_data(fdvp, fwccflag); nfsm_wcc_data(tdvp, twccflag); } - nfsm_reqdone; + m_freem(mrep); +nfsmout: VTONFS(fdvp)->n_flag |= NMODIFIED; VTONFS(tdvp)->n_flag |= NMODIFIED; if (!fwccflag) @@ -1805,7 +1814,8 @@ nfs_link(ap) nfsm_postop_attr(vp, attrflag); nfsm_wcc_data(tdvp, wccflag); } - nfsm_reqdone; + m_freem(mrep); +nfsmout: VTONFS(tdvp)->n_flag |= NMODIFIED; if (!attrflag) VTONFS(vp)->n_attrstamp = 0; @@ -1883,7 +1893,8 @@ nfs_symlink(ap) * out code jumps -> here, mrep is also freed. */ - nfsm_reqdone; + m_freem(mrep); +nfsmout: /* * If we get an EEXIST error, silently convert it to no-error @@ -1972,7 +1983,8 @@ nfs_mkdir(ap) nfsm_mtofh(dvp, newvp, v3, gotvp); if (v3) nfsm_wcc_data(dvp, wccflag); - nfsm_reqdone; + m_freem(mrep); +nfsmout: VTONFS(dvp)->n_flag |= NMODIFIED; if (!wccflag) VTONFS(dvp)->n_attrstamp = 0; @@ -2033,7 +2045,8 @@ nfs_rmdir(ap) nfsm_request(dvp, NFSPROC_RMDIR, cnp->cn_td, cnp->cn_cred); if (v3) nfsm_wcc_data(dvp, wccflag); - nfsm_reqdone; + m_freem(mrep); +nfsmout: VTONFS(dvp)->n_flag |= NMODIFIED; if (!wccflag) VTONFS(dvp)->n_attrstamp = 0; @@ -2632,7 +2645,8 @@ nfs_lookitup(dvp, name, len, cred, td, npp) } else nfsm_loadattr(newvp, (struct vattr *)0); } - nfsm_reqdone; + m_freem(mrep); +nfsmout: if (npp && *npp == NULL) { if (error) { if (newvp) { @@ -2681,7 +2695,8 @@ nfs_commit(struct vnode *vp, u_quad_t offset, int cnt, struct thread *td) error = NFSERR_STALEWRITEVERF; } } - nfsm_reqdone; + m_freem(mrep); +nfsmout: return (error); } diff --git a/sys/vfs/nfs/nfsm_subs.h b/sys/vfs/nfs/nfsm_subs.h index 3b83c3edab..922751fd9b 100644 --- a/sys/vfs/nfs/nfsm_subs.h +++ b/sys/vfs/nfs/nfsm_subs.h @@ -35,7 +35,7 @@ * * @(#)nfsm_subs.h 8.2 (Berkeley) 3/30/95 * $FreeBSD: src/sys/nfs/nfsm_subs.h,v 1.27.2.1 2000/10/28 16:27:27 dwmalone Exp $ - * $DragonFly: src/sys/vfs/nfs/nfsm_subs.h,v 1.4 2003/08/20 09:56:33 rob Exp $ + * $DragonFly: src/sys/vfs/nfs/nfsm_subs.h,v 1.5 2003/11/15 21:05:44 dillon Exp $ */ @@ -377,12 +377,6 @@ struct mbuf *nfsm_rpchead (struct ucred *cr, int nmflag, int procid, mb = mreq = nfsm_reqh((v),(a),(s),&bpos); \ } while (0) -#define nfsm_reqdone \ - do { \ - m_freem(mrep); \ - nfsmout: \ - } while (0) - #define nfsm_rndup(a) (((a)+3)&(~0x3)) #define nfsm_request(v, t, td, c) \ -- 2.41.0