diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index 240be65d19e17041dff51de688660525bda83482..d3f73e3b35a96be0735fb2eaad49e7cccaf2351c 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -199,7 +199,7 @@ static int pcm_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
 		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 @@ static int pcm_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
 		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);
diff --git a/formats/format_pcm_alaw.c b/formats/format_pcm_alaw.c
index de90ce2da7c8c0a0307c4c7c9e54ee63728e343f..af1705f797263dabc6e3c1963026f82c42cf4804 100644
--- a/formats/format_pcm_alaw.c
+++ b/formats/format_pcm_alaw.c
@@ -276,7 +276,7 @@ static int pcm_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
 
 	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 @@ static int pcm_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
 		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);
diff --git a/formats/msgsm.h b/formats/msgsm.h
index ec12161c1da7fa93f96efc6756fa7ad46c5e60db..f951cc271b49d9a7f109a634ebe1d349ad96bcdd 100644
--- a/formats/msgsm.h
+++ b/formats/msgsm.h
@@ -456,7 +456,9 @@ static inline void conv65( wav_byte * c, gsm_byte * d){
 
                 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;