Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/audiocfg Pass WARNS=5.
details: https://anonhg.NetBSD.org/src/rev/d79a0ae84f20
branches: trunk
changeset: 789230:d79a0ae84f20
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Aug 11 06:31:00 2013 +0000
description:
Pass WARNS=5.
diffstat:
usr.bin/audiocfg/Makefile | 3 +--
usr.bin/audiocfg/audiodev.c | 12 ++++++++----
usr.bin/audiocfg/audiodev.h | 4 ++--
usr.bin/audiocfg/dtmf.c | 5 +++--
4 files changed, 14 insertions(+), 10 deletions(-)
diffs (83 lines):
diff -r 9a0ce30c32c8 -r d79a0ae84f20 usr.bin/audiocfg/Makefile
--- a/usr.bin/audiocfg/Makefile Sun Aug 11 06:09:29 2013 +0000
+++ b/usr.bin/audiocfg/Makefile Sun Aug 11 06:31:00 2013 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2010/09/01 09:04:16 jmcneill Exp $
+# $NetBSD: Makefile,v 1.4 2013/08/11 06:31:00 dholland Exp $
PROG= audiocfg
SRCS= audiodev.c drvctl.c dtmf.c
SRCS+= main.c
-WARNS= 3
LDADD+= -lprop -lm
DPADD+= $(LIBPROP) $(LIBM)
diff -r 9a0ce30c32c8 -r d79a0ae84f20 usr.bin/audiocfg/audiodev.c
--- a/usr.bin/audiocfg/audiodev.c Sun Aug 11 06:09:29 2013 +0000
+++ b/usr.bin/audiocfg/audiodev.c Sun Aug 11 06:31:00 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audiodev.c,v 1.4 2010/09/03 19:20:37 jmcneill Exp $ */
+/* $NetBSD: audiodev.c,v 1.5 2013/08/11 06:31:00 dholland Exp $ */
/*
* Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -269,15 +269,19 @@
off = 0;
while (buflen > 0) {
- size_t wlen = info.play.buffer_size;
+ size_t wlen;
+ ssize_t ret;
+
+ wlen = info.play.buffer_size;
if (wlen > buflen)
wlen = buflen;
- wlen = write(adev->fd, (char *)buf + off, wlen);
- if (wlen == -1) {
+ ret = write(adev->fd, (char *)buf + off, wlen);
+ if (ret == -1) {
perror("write");
rv = -1;
goto done;
}
+ wlen = ret;
off += wlen;
buflen -= wlen;
}
diff -r 9a0ce30c32c8 -r d79a0ae84f20 usr.bin/audiocfg/audiodev.h
--- a/usr.bin/audiocfg/audiodev.h Sun Aug 11 06:09:29 2013 +0000
+++ b/usr.bin/audiocfg/audiodev.h Sun Aug 11 06:31:00 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audiodev.h,v 1.3 2010/09/02 02:17:35 jmcneill Exp $ */
+/* $NetBSD: audiodev.h,v 1.4 2013/08/11 06:31:00 dholland Exp $ */
/*
* Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -45,7 +45,7 @@
dev_t dev;
bool defaultdev;
- int pchan;
+ unsigned pchan;
audio_device_t audio_device;
diff -r 9a0ce30c32c8 -r d79a0ae84f20 usr.bin/audiocfg/dtmf.c
--- a/usr.bin/audiocfg/dtmf.c Sun Aug 11 06:09:29 2013 +0000
+++ b/usr.bin/audiocfg/dtmf.c Sun Aug 11 06:31:00 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtmf.c,v 1.2 2010/09/01 21:54:00 jmcneill Exp $ */
+/* $NetBSD: dtmf.c,v 1.3 2013/08/11 06:31:00 dholland Exp $ */
/*
* Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -45,7 +45,8 @@
unsigned short sample_length, unsigned short channels,
unsigned int chanmask, float freq1, float freq2)
{
- int c, i;
+ int c;
+ unsigned i;
size_t sample_count = sample_rate * sample_length;
for (i = 0; i < sample_count; i++) {
Home |
Main Index |
Thread Index |
Old Index