From 79462204f1bbe0fcffb8741e3b07a0d48018fff4 Mon Sep 17 00:00:00 2001 From: Ariff Abdullah Date: Sun, 27 May 2007 20:12:51 +0000 Subject: [PATCH] Fix broken binary issues with latest gcc 4.x due to bitfield signess mishaps for emu10k1 [1] and few other places. Reported/Submitted/Tested by: Ed Schouten [1] --- sys/dev/sound/isa/ess.c | 3 ++- sys/dev/sound/pci/emu10k1.c | 2 +- sys/dev/sound/pci/solo.c | 3 ++- sys/dev/sound/pcm/ac97.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c index 7207e586440..53a8d8d0280 100644 --- a/sys/dev/sound/isa/ess.c +++ b/sys/dev/sound/isa/ess.c @@ -97,7 +97,8 @@ struct ess_info { bus_dma_tag_t parent_dmat; unsigned int bufsize; - int type, duplex:1, newspeed:1; + int type; + unsigned int duplex:1, newspeed:1; u_long bd_flags; /* board-specific flags */ struct ess_chinfo pch, rch; }; diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index 464e06ae09a..9280f679e2c 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -87,7 +87,7 @@ struct emu_mem { struct emu_voice { int vnum; - int b16:1, stereo:1, busy:1, running:1, ismaster:1; + unsigned int b16:1, stereo:1, busy:1, running:1, ismaster:1; int speed; int start, end, vol; int fxrt1; /* FX routing */ diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index efb25075836..112dcb2d10a 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -92,7 +92,8 @@ struct ess_info { void *ih; bus_dma_tag_t parent_dmat; - int simplex_dir, type, duplex:1, newspeed:1, dmasz[2]; + int simplex_dir, type, dmasz[2]; + unsigned int duplex:1, newspeed:1; unsigned int bufsz; struct ess_chinfo pch, rch; diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index e32db6491b3..d01fba5d9fb 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -37,7 +37,7 @@ SND_DECLARE_FILE("$FreeBSD$"); MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); struct ac97mixtable_entry { - int reg:8; /* register index */ + unsigned reg:8; /* register index */ /* reg < 0 if inverted polarity */ unsigned bits:4; /* width of control field */ unsigned ofs:4; /* offset (only if stereo=0) */