[asterisk-commits] mmichelson: branch group/asterisk-cpp r168418 - /team/group/asterisk-cpp/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 10 20:02:29 CST 2009


Author: mmichelson
Date: Sat Jan 10 20:02:28 2009
New Revision: 168418

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168418
Log:
file.c compiles


Modified:
    team/group/asterisk-cpp/main/file.c

Modified: team/group/asterisk-cpp/main/file.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/file.c?view=diff&rev=168418&r1=168417&r2=168418
==============================================================================
--- team/group/asterisk-cpp/main/file.c (original)
+++ team/group/asterisk-cpp/main/file.c Sat Jan 10 20:02:28 2009
@@ -70,7 +70,7 @@
 			return -1;
 		}
 	}
-	if (!(tmp = ast_calloc(1, sizeof(*tmp)))) {
+	if (!(tmp = (struct ast_format *) ast_calloc(1, sizeof(*tmp)))) {
 		AST_RWLIST_UNLOCK(&formats);
 		return -1;
 	}
@@ -285,7 +285,7 @@
 {
 	char *cmd = NULL;
 	size_t size = 0;
-	struct ast_filestream *f = arg;
+	struct ast_filestream *f = (struct ast_filestream *) arg;
 
 	/* Stop a running stream if there is one */
 	if (f->owner) {
@@ -306,7 +306,7 @@
 
 	if (f->realfilename && f->filename) {
 			size = strlen(f->filename) + strlen(f->realfilename) + 15;
-			cmd = alloca(size);
+			cmd = (char *) alloca(size);
 			memset(cmd,0,size);
 			snprintf(cmd,size,"/bin/mv -f %s %s",f->filename,f->realfilename);
 			ast_safe_system(cmd);
@@ -332,7 +332,7 @@
 	struct ast_filestream *s;
 
 	int l = sizeof(*s) + fmt->buf_size + fmt->desc_size;	/* total allocation size */
-	if ( (s = ao2_alloc(l, filestream_destructor)) == NULL)
+	if ( (s = (struct ast_filestream *) ao2_alloc(l, filestream_destructor)) == NULL)
 		return NULL;
 	s->fmt = fmt;
 	s->f = bfile;
@@ -630,7 +630,7 @@
 	if (preflang == NULL)
 		preflang = "";
 	buflen = strlen(preflang) + strlen(filename) + 4;
-	buf = alloca(buflen);
+	buf = (char *) alloca(buflen);
 	if (buf == NULL)
 		return NULL;
 	fmts = fileexists_core(filename, NULL, preflang, buf, buflen);
@@ -661,7 +661,7 @@
 	if (preflang == NULL)
 		preflang = "";
 	buflen = strlen(preflang) + strlen(filename) + 4;
-	buf = alloca(buflen);
+	buf = (char *) alloca(buflen);
 	if (buf == NULL)
 		return NULL;
 
@@ -879,7 +879,7 @@
 	if (preflang == NULL)
 		preflang = "";
 	buflen = strlen(preflang) + strlen(filename) + 4;	/* room for everything */
-	buf = alloca(buflen);
+	buf = (char *) alloca(buflen);
 	if (buf == NULL)
 		return 0;
 	return fileexists_core(filename, fmt, preflang, buf, buflen);
@@ -1052,7 +1052,7 @@
 					*c = '_';
 
 			size = strlen(fn) + strlen(record_cache_dir) + 2;
-			buf = alloca(size);
+			buf = (char *) alloca(size);
 			strcpy(buf, record_cache_dir);
 			strcat(buf, "/");
 			strcat(buf, fn);
@@ -1099,7 +1099,7 @@
 			fs->vfs = NULL;
 			/* If truncated, we'll be at the beginning; if not truncated, then append */
 
-			if ((fs->write_buffer = ast_malloc(32768))){
+			if ((fs->write_buffer = (char *) ast_malloc(32768))){
 				setvbuf(fs->f, fs->write_buffer, _IOFBF, 32768);
 			}
 
@@ -1351,7 +1351,7 @@
 }
 
 struct ast_cli_entry cli_file[] = {
-	AST_CLI_DEFINE(handle_cli_core_show_file_formats, "Displays file formats")
+	ast_cli_entry(handle_cli_core_show_file_formats, "Displays file formats")
 };
 
 int ast_file_init(void)




More information about the asterisk-commits mailing list