[svn-commits] rmudgett: branch 1.8 r370275 - /branches/1.8/main/cel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 19 17:07:49 CDT 2012


Author: rmudgett
Date: Thu Jul 19 17:07:46 2012
New Revision: 370275

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370275
Log:
Fix compiler warnings.

gcc (GCC) 4.2.4 has problems casting away constness.

Modified:
    branches/1.8/main/cel.c

Modified: branches/1.8/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/cel.c?view=diff&rev=370275&r1=370274&r2=370275
==============================================================================
--- branches/1.8/main/cel.c (original)
+++ branches/1.8/main/cel.c Thu Jul 19 17:07:46 2012
@@ -499,11 +499,10 @@
 		return NULL;
 	}
 
-	tchan->appl = app_data;
-	tchan->data = app_data + strlen(record.application_name) + 1;
-
-	strcpy((char *) tchan->appl, record.application_name);
-	strcpy((char *) tchan->data, record.application_data);
+	tchan->appl = strcpy(app_data, record.application_name);
+	tchan->data = strcpy(app_data + strlen(record.application_name) + 1,
+		record.application_data);
+
 	datastore->data = app_data;
 	ast_channel_datastore_add(tchan, datastore);
 




More information about the svn-commits mailing list