summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/sound
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1993-12-19 00:55:01 +0000
committerwollman <wollman@FreeBSD.org>1993-12-19 00:55:01 +0000
commit71b67e5a560e27117fd4ff9fe76b1e67f1423f1e (patch)
tree62dff2aa17f4c31d27a9595b764f9cbc9810eb80 /sys/i386/isa/sound
parentc7341bb860bd0d1789ca0b8bfce96c383fd7dbbc (diff)
downloadFreeBSD-src-71b67e5a560e27117fd4ff9fe76b1e67f1423f1e.zip
FreeBSD-src-71b67e5a560e27117fd4ff9fe76b1e67f1423f1e.tar.gz
Make everything compile with -Wtraditional. Make it easier to distribute
a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements. NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks.
Diffstat (limited to 'sys/i386/isa/sound')
-rw-r--r--sys/i386/isa/sound/dmabuf.c8
-rw-r--r--sys/i386/isa/sound/os.h13
-rw-r--r--sys/i386/isa/sound/soundcard.c8
3 files changed, 15 insertions, 14 deletions
diff --git a/sys/i386/isa/sound/dmabuf.c b/sys/i386/isa/sound/dmabuf.c
index da20ec5..ace02d1 100644
--- a/sys/i386/isa/sound/dmabuf.c
+++ b/sys/i386/isa/sound/dmabuf.c
@@ -510,9 +510,9 @@ DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode)
printk ("sound: Invalid DMA mode for device %d\n", dev);
isa_dmastart ((dma_mode == DMA_MODE_READ) ? B_READ : B_WRITE,
- snd_raw_buf_phys[dev][0],
- sound_buffsizes[dev],
- chan);
+ (caddr_t)snd_raw_buf_phys[dev][0],
+ (unsigned)sound_buffsizes[dev],
+ (unsigned)chan);
#else
#ifdef ISC
printk ("sound: Invalid DMA mode for device %d\n", dev);
@@ -540,7 +540,7 @@ DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode)
#else
#ifdef __386BSD__
isa_dmastart ((dma_mode == DMA_MODE_READ) ? B_READ : B_WRITE,
- physaddr,
+ (caddr_t)physaddr,
count,
chan);
#else
diff --git a/sys/i386/isa/sound/os.h b/sys/i386/isa/sound/os.h
index 60fb96c..fba2098 100644
--- a/sys/i386/isa/sound/os.h
+++ b/sys/i386/isa/sound/os.h
@@ -110,12 +110,12 @@ typedef struct uio snd_rw_buf;
* user space. The count is number of bytes to be moved.
*/
#define COPY_FROM_USER(target, source, offs, count) \
- do { if (uiomove(target, count, source)) { \
+ do { if (uiomove(target, count, (struct uio *)source)) { \
printf ("sb: Bad copyin()!\n"); \
} } while(0)
/* Like COPY_FOM_USER but for writes. */
#define COPY_TO_USER(target, offs, source, count) \
- do { if (uiomove(source, count, target)) { \
+ do { if (uiomove(source, count, (struct uio *)target)) { \
printf ("sb: Bad copyout()!\n"); \
} } while(0)
/*
@@ -123,10 +123,10 @@ typedef struct uio snd_rw_buf;
* short (16 bit) or long (32 bit) at a time.
* The same restrictions apply than for COPY_*_USER
*/
-#define GET_BYTE_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 1, addr);}
-#define GET_SHORT_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 2, addr);}
-#define GET_WORD_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 4, addr);}
-#define PUT_WORD_TO_USER(addr, offs, data) {uiomove((char*)&(data), 4, addr);}
+#define GET_BYTE_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 1, (struct uio *)addr);}
+#define GET_SHORT_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 2, (struct uio *)addr);}
+#define GET_WORD_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 4, (struct uio *)addr);}
+#define PUT_WORD_TO_USER(addr, offs, data) {uiomove((char*)&(data), 4, (struct uio *)addr);}
/*
* The way how the ioctl arguments are passed is another nonportable thing.
@@ -224,6 +224,7 @@ typedef struct uio snd_rw_buf;
*
*/
#define GET_TIME() get_time()
+extern long get_time(void);
/*#define GET_TIME() (lbolt)*/ /* Returns current time (1/HZ secs since boot) */
/*
diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c
index b9044f3..593f928 100644
--- a/sys/i386/isa/sound/soundcard.c
+++ b/sys/i386/isa/sound/soundcard.c
@@ -75,7 +75,7 @@ int sndwrite (int dev, struct uio *uio);
int sndselect (int dev, int rw);
static void sound_mem_init(void);
-int
+long
get_time()
{
extern struct timeval time;
@@ -393,7 +393,7 @@ sndattach (struct isa_device *dev)
static int midi_initialized = 0;
static int seq_initialized = 0;
static int generic_midi_initialized = 0;
- unsigned long mem_start = 0xefffffff;
+ unsigned long mem_start = 0xefffffffUL;
struct address_info hw_config;
hw_config.io_base = dev->id_iobase;
@@ -514,7 +514,7 @@ void
sound_stop_timer (void)
{
if (timer_running)
- untimeout (sequencer_timer, 0);
+ untimeout ((timeout_func_t)sequencer_timer, 0); /* XXX should fix */
timer_running = 0;
}
@@ -555,7 +555,7 @@ sound_mem_init (void)
if (sound_buffsizes[dev] > dma_pagesize)
sound_buffsizes[dev] = dma_pagesize;
- sound_buffsizes[dev] &= 0xfffff000; /* Truncate to n*4k */
+ sound_buffsizes[dev] &= ~0xfff; /* Truncate to n*4k */
if (sound_buffsizes[dev] < 4096)
sound_buffsizes[dev] = 4096;
OpenPOWER on IntegriCloud