[asterisk-commits] trunk r10877 - in /trunk/formats: format_pcm.c format_pcm_alaw.c msgsm.h

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 23 11:00:53 MST 2006


Author: kpfleming
Date: Thu Feb 23 12:00:50 2006
New Revision: 10877

URL: http://svn.digium.com/view/asterisk?rev=10877&view=rev
Log:
silence some more compiler warnings

Modified:
    trunk/formats/format_pcm.c
    trunk/formats/format_pcm_alaw.c
    trunk/formats/msgsm.h

Modified: trunk/formats/format_pcm.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_pcm.c?rev=10877&r1=10876&r2=10877&view=diff
==============================================================================
--- trunk/formats/format_pcm.c (original)
+++ trunk/formats/format_pcm.c Thu Feb 23 12:00:50 2006
@@ -199,7 +199,7 @@
 		offset = sample_offset;
 	}
 	if (offset < 0) {
-		ast_log(LOG_WARNING, "negative offset %ld, resetting to 0\n", offset);
+		ast_log(LOG_WARNING, "negative offset %ld, resetting to 0\n", (long) offset);
 		offset = 0;
 	}
 	if (whence == SEEK_FORCECUR && offset > max) { /* extend the file */
@@ -215,7 +215,7 @@
 		ret = 0; /* successful */
 	} else {
 		if (offset > max) {
-			ast_log(LOG_WARNING, "offset too large %ld, truncating to %ld\n", offset, max);
+			ast_log(LOG_WARNING, "offset too large %ld, truncating to %ld\n", (long) offset, (long) max);
 			offset = max;
 		}
 		ret = fseeko(fs->f, offset, SEEK_SET);

Modified: trunk/formats/format_pcm_alaw.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_pcm_alaw.c?rev=10877&r1=10876&r2=10877&view=diff
==============================================================================
--- trunk/formats/format_pcm_alaw.c (original)
+++ trunk/formats/format_pcm_alaw.c Thu Feb 23 12:00:50 2006
@@ -276,7 +276,7 @@
 
 	if (offset < 0) {
 		offset = 0;
-		ast_log(LOG_WARNING, "negative offset %ld, resetting to 0\n", offset);
+		ast_log(LOG_WARNING, "negative offset %ld, resetting to 0\n", (long) offset);
 	}
 	if (whence == SEEK_FORCECUR && offset > max) {
 		size_t left = offset - max;
@@ -291,7 +291,7 @@
 		ret = 0; /* success */
 	} else {
 		if (offset > max) {
-			ast_log(LOG_WARNING, "offset too large %ld, truncating to %ld\n", offset, max);
+			ast_log(LOG_WARNING, "offset too large %ld, truncating to %ld\n", (long) offset, (long) max);
 			offset = max;
 		}
 		ret = fseeko(fs->f, offset, SEEK_SET);

Modified: trunk/formats/msgsm.h
URL: http://svn.digium.com/view/asterisk/trunk/formats/msgsm.h?rev=10877&r1=10876&r2=10877&view=diff
==============================================================================
--- trunk/formats/msgsm.h (original)
+++ trunk/formats/msgsm.h Thu Feb 23 12:00:50 2006
@@ -456,7 +456,9 @@
 
                 unsigned int sr = 0;
                 unsigned int frame_chain;
-				unsigned int    LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4];
+		unsigned int LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4];
+		/* silence bogus compiler warning */
+		unsigned int xmc[13*4] = { 0, };
  
                         sr = *c++;
                         LARc[0] = sr & 0x3f;  sr >>= 6;



More information about the asterisk-commits mailing list