mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	import gcc 4.3.2 warning fixes from trunk, with a few changes specific to this branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@153710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -126,7 +126,9 @@ static int gsm_seek(struct ast_filestream *fs, off_t sample_offset, int whence) | ||||
| 		int i; | ||||
| 		fseeko(fs->f, 0, SEEK_END); | ||||
| 		for (i=0; i< (offset - max) / GSM_FRAME_SIZE; i++) { | ||||
| 			fwrite(gsm_silence, 1, GSM_FRAME_SIZE, fs->f); | ||||
| 			if (!fwrite(gsm_silence, 1, GSM_FRAME_SIZE, fs->f)) { | ||||
| 				ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno)); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return fseeko(fs->f, offset, SEEK_SET); | ||||
|   | ||||
| @@ -225,8 +225,12 @@ static int ogg_vorbis_rewrite(struct ast_filestream *s, | ||||
| 	while (!tmp->eos) { | ||||
| 		if (ogg_stream_flush(&tmp->os, &tmp->og) == 0) | ||||
| 			break; | ||||
| 		fwrite(tmp->og.header, 1, tmp->og.header_len, s->f); | ||||
| 		fwrite(tmp->og.body, 1, tmp->og.body_len, s->f); | ||||
| 		if (!fwrite(tmp->og.header, 1, tmp->og.header_len, s->f)) { | ||||
| 			ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno)); | ||||
| 		} | ||||
| 		if (!fwrite(tmp->og.body, 1, tmp->og.body_len, s->f)) { | ||||
| 			ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno)); | ||||
| 		} | ||||
| 		if (ogg_page_eos(&tmp->og)) | ||||
| 			tmp->eos = 1; | ||||
| 	} | ||||
| @@ -251,8 +255,12 @@ static void write_stream(struct vorbis_desc *s, FILE *f) | ||||
| 				if (ogg_stream_pageout(&s->os, &s->og) == 0) { | ||||
| 					break; | ||||
| 				} | ||||
| 				fwrite(s->og.header, 1, s->og.header_len, f); | ||||
| 				fwrite(s->og.body, 1, s->og.body_len, f); | ||||
| 				if (!fwrite(s->og.header, 1, s->og.header_len, f)) { | ||||
| 				ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno)); | ||||
| 				} | ||||
| 				if (!fwrite(s->og.body, 1, s->og.body_len, f)) { | ||||
| 					ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno)); | ||||
| 				} | ||||
| 				if (ogg_page_eos(&s->og)) { | ||||
| 					s->eos = 1; | ||||
| 				} | ||||
|   | ||||
| @@ -334,8 +334,11 @@ static void wav_close(struct ast_filestream *s) | ||||
| 	} | ||||
|  | ||||
| 	/* Pad to even length */ | ||||
| 	if (fs->bytes & 0x1) | ||||
| 		fwrite(&zero, 1, 1, s->f); | ||||
| 	if (fs->bytes & 0x1) { | ||||
| 		if (!fwrite(&zero, 1, 1, s->f)) { | ||||
| 			ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno)); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext) | ||||
|   | ||||
| @@ -496,7 +496,9 @@ static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence) | ||||
| 		int i; | ||||
| 		fseek(fs->f, 0, SEEK_END); | ||||
| 		for (i=0; i< (offset - max) / MSGSM_FRAME_SIZE; i++) { | ||||
| 			fwrite(msgsm_silence, 1, MSGSM_FRAME_SIZE, fs->f); | ||||
| 			if (!fwrite(msgsm_silence, 1, MSGSM_FRAME_SIZE, fs->f)) { | ||||
| 				ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno)); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	s->secondhalf = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user