[dahdi-commits] kpfleming: tools/trunk r5365 - in /tools/trunk: dahdi_monitor.c fxotune.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Fri Nov 21 17:22:43 CST 2008


Author: kpfleming
Date: Fri Nov 21 17:22:43 2008
New Revision: 5365

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5365
Log:
minor fixes to accommodate compilers who check return result usage

Modified:
    tools/trunk/dahdi_monitor.c
    tools/trunk/fxotune.c

Modified: tools/trunk/dahdi_monitor.c
URL: http://svn.digium.com/view/dahdi/tools/trunk/dahdi_monitor.c?view=diff&rev=5365&r1=5364&r2=5365
==============================================================================
--- tools/trunk/dahdi_monitor.c (original)
+++ tools/trunk/dahdi_monitor.c Fri Nov 21 17:22:43 2008
@@ -575,21 +575,21 @@
 			break;
 		readcount += res_brx;
 		if (ofh[MON_BRX])
-			fwrite(buf_brx, 1, res_brx, ofh[MON_BRX]);
+			x = fwrite(buf_brx, 1, res_brx, ofh[MON_BRX]);
 
 		if (multichannel) {
 			res_tx = read(pfd[MON_TX], buf_tx, res_brx);
 			if (res_tx < 1)
 				break;
 			if (ofh[MON_TX])
-				fwrite(buf_tx, 1, res_tx, ofh[MON_TX]);
+				x = fwrite(buf_tx, 1, res_tx, ofh[MON_TX]);
 
 			if (stereo_output && ofh[MON_STEREO]) {
 				for (x=0;x<res_tx;x++) {
 					stereobuf[x*2] = buf_brx[x];
 					stereobuf[x*2+1] = buf_tx[x];
 				}
-				fwrite(stereobuf, 1, res_tx*2, ofh[MON_STEREO]);
+				x = fwrite(stereobuf, 1, res_tx*2, ofh[MON_STEREO]);
 			}
 
 			if (visual) {
@@ -605,32 +605,33 @@
 			if (res_brx < 1)
 				break;
 			if (ofh[MON_PRE_BRX])
-				fwrite(buf_brx, 1, res_brx, ofh[MON_PRE_BRX]);
+				x = fwrite(buf_brx, 1, res_brx, ofh[MON_PRE_BRX]);
 
 			if (multichannel) {
 				res_tx = read(pfd[MON_PRE_TX], buf_tx, res_brx);
 				if (res_tx < 1)
 					break;
 				if (ofh[MON_PRE_TX])
-					fwrite(buf_tx, 1, res_tx, ofh[MON_PRE_TX]);
+					x = fwrite(buf_tx, 1, res_tx, ofh[MON_PRE_TX]);
 
 				if (stereo_output && ofh[MON_PRE_STEREO]) {
 					for (x=0;x<res_brx;x++) {
 						stereobuf[x*2] = buf_brx[x];
 						stereobuf[x*2+1] = buf_tx[x];
 					}
-					fwrite(stereobuf, 1, res_brx*2, ofh[MON_PRE_STEREO]);
+					x = fwrite(stereobuf, 1, res_brx*2, ofh[MON_PRE_STEREO]);
 				}
 			}
 		}
 
 		if (ossoutput && afd) {
 			if (stereo) {
-				for (x=0;x<res_brx;x++)
+				for (x=0;x<res_brx;x++) {
 					buf_tx[x<<1] = buf_tx[(x<<1) + 1] = buf_brx[x];
-				write(afd, buf_tx, res_brx << 1);
+				}
+				x = write(afd, buf_tx, res_brx << 1);
 			} else
-				write(afd, buf_brx, res_brx);
+				x = write(afd, buf_brx, res_brx);
 		}
 
 		if (limit && readcount >= limit) {

Modified: tools/trunk/fxotune.c
URL: http://svn.digium.com/view/dahdi/tools/trunk/fxotune.c?view=diff&rev=5365&r1=5364&r2=5365
==============================================================================
--- tools/trunk/fxotune.c (original)
+++ tools/trunk/fxotune.c Fri Nov 21 17:22:43 2008
@@ -110,7 +110,7 @@
 	res = read(fd, buffer, len);
 
 	if ((res > 0) && (audio_dump_fd != -1)) {
-		write(audio_dump_fd, buffer, len);
+		res = write(audio_dump_fd, buffer, len);
 	}
 
 	return res;




More information about the dahdi-commits mailing list