[asterisk-commits] seanbright: branch seanbright/resolve-shadow-warnings r114310 - in /team/sean...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Apr 19 16:25:15 CDT 2008


Author: seanbright
Date: Sat Apr 19 16:25:15 2008
New Revision: 114310

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114310
Log:
codecs/ & formats/ & cdr/ oh my

Modified:
    team/seanbright/resolve-shadow-warnings/cdr/cdr_adaptive_odbc.c
    team/seanbright/resolve-shadow-warnings/cdr/cdr_csv.c
    team/seanbright/resolve-shadow-warnings/cdr/cdr_pgsql.c
    team/seanbright/resolve-shadow-warnings/cdr/cdr_radius.c
    team/seanbright/resolve-shadow-warnings/cdr/cdr_tds.c
    team/seanbright/resolve-shadow-warnings/codecs/codec_zap.c
    team/seanbright/resolve-shadow-warnings/formats/format_pcm.c
    team/seanbright/resolve-shadow-warnings/formats/msgsm.h

Modified: team/seanbright/resolve-shadow-warnings/cdr/cdr_adaptive_odbc.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/cdr/cdr_adaptive_odbc.c?view=diff&rev=114310&r1=114309&r2=114310
==============================================================================
--- team/seanbright/resolve-shadow-warnings/cdr/cdr_adaptive_odbc.c (original)
+++ team/seanbright/resolve-shadow-warnings/cdr/cdr_adaptive_odbc.c Sat Apr 19 16:25:15 2008
@@ -191,8 +191,8 @@
 			 */
 			for (var = ast_variable_browse(cfg, catg); var; var = var->next) {
 				if (strncmp(var->name, "alias", 5) == 0 && strcasecmp(var->value, columnname) == 0) {
-					char *tmp = ast_strdupa(var->name + 5);
-					cdrvar = ast_strip(tmp);
+					char *alias = ast_strdupa(var->name + 5);
+					cdrvar = ast_strip(alias);
 					ast_verb(3, "Found alias %s for column %s in %s@%s\n", cdrvar, columnname, tableptr->table, tableptr->connection);
 					break;
 				}

Modified: team/seanbright/resolve-shadow-warnings/cdr/cdr_csv.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/cdr/cdr_csv.c?view=diff&rev=114310&r1=114309&r2=114310
==============================================================================
--- team/seanbright/resolve-shadow-warnings/cdr/cdr_csv.c (original)
+++ team/seanbright/resolve-shadow-warnings/cdr/cdr_csv.c Sat Apr 19 16:25:15 2008
@@ -178,7 +178,7 @@
 	return 0;
 }
 
-static int append_date(char *buf, struct timeval tv, size_t bufsize)
+static int append_date(char *buf, struct timeval calldate, size_t bufsize)
 {
 	char tmp[80] = "";
 	struct ast_tm tm;
@@ -186,12 +186,12 @@
 	if (strlen(buf) > bufsize - 3)
 		return -1;
 
-	if (ast_tvzero(tv)) {
+	if (ast_tvzero(calldate)) {
 		strncat(buf, ",", bufsize - strlen(buf) - 1);
 		return 0;
 	}
 
-	ast_localtime(&tv, &tm, usegmtime ? "GMT" : NULL);
+	ast_localtime(&calldate, &tm, usegmtime ? "GMT" : NULL);
 	ast_strftime(tmp, sizeof(tmp), DATE_FORMAT, &tm);
 
 	return append_string(buf, tmp, bufsize);

Modified: team/seanbright/resolve-shadow-warnings/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/cdr/cdr_pgsql.c?view=diff&rev=114310&r1=114309&r2=114310
==============================================================================
--- team/seanbright/resolve-shadow-warnings/cdr/cdr_pgsql.c (original)
+++ team/seanbright/resolve-shadow-warnings/cdr/cdr_pgsql.c Sat Apr 19 16:25:15 2008
@@ -201,14 +201,14 @@
 					LENGTHEN_BUF2(12);
 					lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%s", value);
 				} else if (strncmp(cur->type, "float", 5) == 0) {
-					struct timeval *tv = cur->name[0] == 'd' ? &cdr->start : &cdr->answer;
-					LENGTHEN_BUF2(30);
-					lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->end.tv_sec - tv->tv_sec + cdr->end.tv_usec / 1000000.0 - tv->tv_usec / 1000000.0);
+					struct timeval *val = cur->name[0] == 'd' ? &cdr->start : &cdr->answer;
+					LENGTHEN_BUF2(30);
+					lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->end.tv_sec - val->tv_sec + cdr->end.tv_usec / 1000000.0 - val->tv_usec / 1000000.0);
 				} else {
 					/* Char field, probably */
-					struct timeval *tv = cur->name[0] == 'd' ? &cdr->start : &cdr->answer;
-					LENGTHEN_BUF2(30);
-					lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "'%f'", (double)cdr->end.tv_sec - tv->tv_sec + cdr->end.tv_usec / 1000000.0 - tv->tv_usec / 1000000.0);
+					struct timeval *val = cur->name[0] == 'd' ? &cdr->start : &cdr->answer;
+					LENGTHEN_BUF2(30);
+					lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "'%f'", (double)cdr->end.tv_sec - val->tv_sec + cdr->end.tv_usec / 1000000.0 - val->tv_usec / 1000000.0);
 				}
 			} else if (strcmp(cur->name, "disposition") == 0 || strcmp(cur->name, "amaflags") == 0) {
 				if (strncmp(cur->type, "int", 3) == 0) {
@@ -318,7 +318,7 @@
 
 static int unload_module(void)
 {
-	struct columns *cur;
+	struct columns *current;
 	ast_cdr_unregister(name);
 
 	/* Give all threads time to finish */
@@ -339,8 +339,8 @@
 		ast_free(table);
 
 	AST_RWLIST_WRLOCK(&psql_columns);
-	while ((cur = AST_RWLIST_REMOVE_HEAD(&psql_columns, list))) {
-		ast_free(cur);
+	while ((current = AST_RWLIST_REMOVE_HEAD(&psql_columns, list))) {
+		ast_free(current);
 	}
 	AST_RWLIST_UNLOCK(&psql_columns);
 

Modified: team/seanbright/resolve-shadow-warnings/cdr/cdr_radius.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/cdr/cdr_radius.c?view=diff&rev=114310&r1=114309&r2=114310
==============================================================================
--- team/seanbright/resolve-shadow-warnings/cdr/cdr_radius.c (original)
+++ team/seanbright/resolve-shadow-warnings/cdr/cdr_radius.c Sat Apr 19 16:25:15 2008
@@ -87,50 +87,50 @@
 
 static rc_handle *rh = NULL;
 
-static int build_radius_record(VALUE_PAIR **send, struct ast_cdr *cdr)
+static int build_radius_record(VALUE_PAIR **to_send, struct ast_cdr *cdr)
 {
 	int recordtype = PW_STATUS_STOP;
 	struct ast_tm tm;
 	char timestr[128];
 	char *tmp;
 
-	if (!rc_avpair_add(rh, send, PW_ACCT_STATUS_TYPE, &recordtype, 0, 0))
+	if (!rc_avpair_add(rh, to_send, PW_ACCT_STATUS_TYPE, &recordtype, 0, 0))
 		return -1;
 
 	/* Account code */
-	if (!rc_avpair_add(rh, send, PW_AST_ACCT_CODE, &cdr->accountcode, strlen(cdr->accountcode), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_ACCT_CODE, &cdr->accountcode, strlen(cdr->accountcode), VENDOR_CODE))
 		return -1;
 
  	/* Source */
-	if (!rc_avpair_add(rh, send, PW_AST_SRC, &cdr->src, strlen(cdr->src), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_SRC, &cdr->src, strlen(cdr->src), VENDOR_CODE))
 		return -1;
 
  	/* Destination */
-	if (!rc_avpair_add(rh, send, PW_AST_DST, &cdr->dst, strlen(cdr->dst), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_DST, &cdr->dst, strlen(cdr->dst), VENDOR_CODE))
 		return -1;
 
  	/* Destination context */
-	if (!rc_avpair_add(rh, send, PW_AST_DST_CTX, &cdr->dcontext, strlen(cdr->dcontext), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_DST_CTX, &cdr->dcontext, strlen(cdr->dcontext), VENDOR_CODE))
 		return -1;
 
 	/* Caller ID */
-	if (!rc_avpair_add(rh, send, PW_AST_CLID, &cdr->clid, strlen(cdr->clid), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_CLID, &cdr->clid, strlen(cdr->clid), VENDOR_CODE))
 		return -1;
 
 	/* Channel */
-	if (!rc_avpair_add(rh, send, PW_AST_CHAN, &cdr->channel, strlen(cdr->channel), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_CHAN, &cdr->channel, strlen(cdr->channel), VENDOR_CODE))
 		return -1;
 
 	/* Destination Channel */
-	if (!rc_avpair_add(rh, send, PW_AST_DST_CHAN, &cdr->dstchannel, strlen(cdr->dstchannel), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_DST_CHAN, &cdr->dstchannel, strlen(cdr->dstchannel), VENDOR_CODE))
 		return -1;
 
 	/* Last Application */
-	if (!rc_avpair_add(rh, send, PW_AST_LAST_APP, &cdr->lastapp, strlen(cdr->lastapp), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_LAST_APP, &cdr->lastapp, strlen(cdr->lastapp), VENDOR_CODE))
 		return -1;
 
 	/* Last Data */
-	if (!rc_avpair_add(rh, send, PW_AST_LAST_DATA, &cdr->lastdata, strlen(cdr->lastdata), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_LAST_DATA, &cdr->lastdata, strlen(cdr->lastdata), VENDOR_CODE))
 		return -1;
 
 
@@ -138,61 +138,61 @@
 	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT, 
 		ast_localtime(&cdr->start, &tm,
 			ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME) ? "GMT" : NULL));
-	if (!rc_avpair_add(rh, send, PW_AST_START_TIME, timestr, strlen(timestr), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_START_TIME, timestr, strlen(timestr), VENDOR_CODE))
 		return -1;
 
 	/* Answer Time */
 	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT, 
 		ast_localtime(&cdr->answer, &tm,
 			ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME) ? "GMT" : NULL));
-	if (!rc_avpair_add(rh, send, PW_AST_ANSWER_TIME, timestr, strlen(timestr), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_ANSWER_TIME, timestr, strlen(timestr), VENDOR_CODE))
 		return -1;
 
 	/* End Time */
 	ast_strftime(timestr, sizeof(timestr), DATE_FORMAT, 
 		ast_localtime(&cdr->end, &tm,
 			ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME) ? "GMT" : NULL));
-	if (!rc_avpair_add(rh, send, PW_AST_END_TIME, timestr, strlen(timestr), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_END_TIME, timestr, strlen(timestr), VENDOR_CODE))
 		return -1;
 
  	/* Duration */ 
-	if (!rc_avpair_add(rh, send, PW_AST_DURATION, &cdr->duration, 0, VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_DURATION, &cdr->duration, 0, VENDOR_CODE))
 		return -1;
 
 	/* Billable seconds */
-	if (!rc_avpair_add(rh, send, PW_AST_BILL_SEC, &cdr->billsec, 0, VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_BILL_SEC, &cdr->billsec, 0, VENDOR_CODE))
 		return -1;
 
 	/* Disposition */
 	tmp = ast_cdr_disp2str(cdr->disposition);
-	if (!rc_avpair_add(rh, send, PW_AST_DISPOSITION, tmp, strlen(tmp), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_DISPOSITION, tmp, strlen(tmp), VENDOR_CODE))
 		return -1;
 
 	/* AMA Flags */
 	tmp = ast_cdr_flags2str(cdr->amaflags);
-	if (!rc_avpair_add(rh, send, PW_AST_AMA_FLAGS, tmp, strlen(tmp), VENDOR_CODE))
+	if (!rc_avpair_add(rh, to_send, PW_AST_AMA_FLAGS, tmp, strlen(tmp), VENDOR_CODE))
 		return -1;
 
 	if (ast_test_flag(&global_flags, RADIUS_FLAG_LOGUNIQUEID)) {
 		/* Unique ID */
-		if (!rc_avpair_add(rh, send, PW_AST_UNIQUE_ID, &cdr->uniqueid, strlen(cdr->uniqueid), VENDOR_CODE))
+		if (!rc_avpair_add(rh, to_send, PW_AST_UNIQUE_ID, &cdr->uniqueid, strlen(cdr->uniqueid), VENDOR_CODE))
 			return -1;
 	}
 
 	if (ast_test_flag(&global_flags, RADIUS_FLAG_LOGUSERFIELD)) {
 		/* append the user field */
-		if (!rc_avpair_add(rh, send, PW_AST_USER_FIELD, &cdr->userfield, strlen(cdr->userfield), VENDOR_CODE))
+		if (!rc_avpair_add(rh, to_send, PW_AST_USER_FIELD, &cdr->userfield, strlen(cdr->userfield), VENDOR_CODE))
 			return -1;
 	}
 
 	/* Setting Acct-Session-Id & User-Name attributes for proper generation
 	   of Acct-Unique-Session-Id on server side */ 
 	/* Channel */
-	if (!rc_avpair_add(rh, send, PW_USER_NAME, &cdr->channel, strlen(cdr->channel), 0))
+	if (!rc_avpair_add(rh, to_send, PW_USER_NAME, &cdr->channel, strlen(cdr->channel), 0))
 		return -1;
 
 	/* Unique ID */
-	if (!rc_avpair_add(rh, send, PW_ACCT_SESSION_ID, &cdr->uniqueid, strlen(cdr->uniqueid), 0))
+	if (!rc_avpair_add(rh, to_send, PW_ACCT_SESSION_ID, &cdr->uniqueid, strlen(cdr->uniqueid), 0))
 		return -1;
 
 	return 0;
@@ -201,14 +201,14 @@
 static int radius_log(struct ast_cdr *cdr)
 {
 	int result = ERROR_RC;
-	VALUE_PAIR *send = NULL;
-
-	if (build_radius_record(&send, cdr)) {
+	VALUE_PAIR *to_send = NULL;
+
+	if (build_radius_record(&to_send, cdr)) {
 		ast_debug(1, "Unable to create RADIUS record. CDR not recorded!\n");
 		return result;
 	}
 	
-	result = rc_acct(rh, 0, send);
+	result = rc_acct(rh, 0, to_send);
 	if (result != OK_RC)
 		ast_log(LOG_ERROR, "Failed to record Radius CDR record!\n");
 

Modified: team/seanbright/resolve-shadow-warnings/cdr/cdr_tds.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/cdr/cdr_tds.c?view=diff&rev=114310&r1=114309&r2=114310
==============================================================================
--- team/seanbright/resolve-shadow-warnings/cdr/cdr_tds.c (original)
+++ team/seanbright/resolve-shadow-warnings/cdr/cdr_tds.c Sat Apr 19 16:25:15 2008
@@ -269,15 +269,15 @@
 	return buf;
 }
 
-static void get_date(char *dateField, struct timeval tv)
+static void get_date(char *dateField, struct timeval calldate)
 {
 	struct ast_tm tm;
 	char buf[80];
 
 	/* To make sure we have date variable if not insert null to SQL */
-	if (!ast_tvzero(tv))
-	{
-		ast_localtime(&tv, &tm, NULL);
+	if (!ast_tvzero(calldate))
+	{
+		ast_localtime(&calldate, &tm, NULL);
 		ast_strftime(buf, 80, DATE_FORMAT, &tm);
 		sprintf(dateField, "'%s'", buf);
 	}

Modified: team/seanbright/resolve-shadow-warnings/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/codecs/codec_zap.c?view=diff&rev=114310&r1=114309&r2=114310
==============================================================================
--- team/seanbright/resolve-shadow-warnings/codecs/codec_zap.c (original)
+++ team/seanbright/resolve-shadow-warnings/codecs/codec_zap.c Sat Apr 19 16:25:15 2008
@@ -362,12 +362,12 @@
 
 static void unregister_translators(void)
 {
-	struct translator *cur;
+	struct translator *current;
 
 	AST_LIST_LOCK(&translators);
-	while ((cur = AST_LIST_REMOVE_HEAD(&translators, entry))) {
-		ast_unregister_translator(&cur->t);
-		ast_free(cur);
+	while ((current = AST_LIST_REMOVE_HEAD(&translators, entry))) {
+		ast_unregister_translator(&current->t);
+		ast_free(current);
 	}
 	AST_LIST_UNLOCK(&translators);
 }

Modified: team/seanbright/resolve-shadow-warnings/formats/format_pcm.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/formats/format_pcm.c?view=diff&rev=114310&r1=114309&r2=114310
==============================================================================
--- team/seanbright/resolve-shadow-warnings/formats/format_pcm.c (original)
+++ team/seanbright/resolve-shadow-warnings/formats/format_pcm.c Sat Apr 19 16:25:15 2008
@@ -469,13 +469,13 @@
 
 static int load_module(void)
 {
-	int index;
+	int i;
 
 	/* XXX better init ? */
-	for (index = 0; index < (sizeof(ulaw_silence) / sizeof(ulaw_silence[0])); index++)
-		ulaw_silence[index] = AST_LIN2MU(0);
-	for (index = 0; index < (sizeof(alaw_silence) / sizeof(alaw_silence[0])); index++)
-		alaw_silence[index] = AST_LIN2A(0);
+	for (i = 0; i < ARRAY_LEN(ulaw_silence); i++)
+		ulaw_silence[i] = AST_LIN2MU(0);
+	for (i = 0; i < ARRAY_LEN(alaw_silence); i++)
+		alaw_silence[i] = AST_LIN2A(0);
 
 	if ( ast_format_register(&pcm_f)
 		|| ast_format_register(&alaw_f)

Modified: team/seanbright/resolve-shadow-warnings/formats/msgsm.h
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/formats/msgsm.h?view=diff&rev=114310&r1=114309&r2=114310
==============================================================================
--- team/seanbright/resolve-shadow-warnings/formats/msgsm.h (original)
+++ team/seanbright/resolve-shadow-warnings/formats/msgsm.h Sat Apr 19 16:25:15 2008
@@ -9,106 +9,106 @@
 typedef unsigned int			uword;
 
 #define readGSM_33(c1) { \
-		gsm_byte *c = (c1); \
-        LARc[0]  = (*c++ & 0xF) << 2;           /* 1 */ \
-        LARc[0] |= (*c >> 6) & 0x3; \
-        LARc[1]  = *c++ & 0x3F; \
-        LARc[2]  = (*c >> 3) & 0x1F; \
-        LARc[3]  = (*c++ & 0x7) << 2; \
-        LARc[3] |= (*c >> 6) & 0x3; \
-        LARc[4]  = (*c >> 2) & 0xF; \
-        LARc[5]  = (*c++ & 0x3) << 2; \
-        LARc[5] |= (*c >> 6) & 0x3; \
-        LARc[6]  = (*c >> 3) & 0x7; \
-        LARc[7]  = *c++ & 0x7; \
-        Nc[0]  = (*c >> 1) & 0x7F; \
-        bc[0]  = (*c++ & 0x1) << 1; \
-        bc[0] |= (*c >> 7) & 0x1; \
-        Mc[0]  = (*c >> 5) & 0x3; \
-        xmaxc[0]  = (*c++ & 0x1F) << 1; \
-        xmaxc[0] |= (*c >> 7) & 0x1; \
-        xmc[0]  = (*c >> 4) & 0x7; \
-        xmc[1]  = (*c >> 1) & 0x7; \
-        xmc[2]  = (*c++ & 0x1) << 2; \
-        xmc[2] |= (*c >> 6) & 0x3; \
-        xmc[3]  = (*c >> 3) & 0x7; \
-        xmc[4]  = *c++ & 0x7; \
-        xmc[5]  = (*c >> 5) & 0x7; \
-        xmc[6]  = (*c >> 2) & 0x7; \
-        xmc[7]  = (*c++ & 0x3) << 1;            /* 10 */ \
-        xmc[7] |= (*c >> 7) & 0x1; \
-        xmc[8]  = (*c >> 4) & 0x7; \
-        xmc[9]  = (*c >> 1) & 0x7; \
-        xmc[10]  = (*c++ & 0x1) << 2; \
-        xmc[10] |= (*c >> 6) & 0x3; \
-        xmc[11]  = (*c >> 3) & 0x7; \
-        xmc[12]  = *c++ & 0x7; \
-        Nc[1]  = (*c >> 1) & 0x7F; \
-        bc[1]  = (*c++ & 0x1) << 1; \
-        bc[1] |= (*c >> 7) & 0x1; \
-        Mc[1]  = (*c >> 5) & 0x3; \
-        xmaxc[1]  = (*c++ & 0x1F) << 1; \
-        xmaxc[1] |= (*c >> 7) & 0x1; \
-        xmc[13]  = (*c >> 4) & 0x7; \
-        xmc[14]  = (*c >> 1) & 0x7; \
-        xmc[15]  = (*c++ & 0x1) << 2; \
-        xmc[15] |= (*c >> 6) & 0x3; \
-        xmc[16]  = (*c >> 3) & 0x7; \
-        xmc[17]  = *c++ & 0x7; \
-        xmc[18]  = (*c >> 5) & 0x7; \
-        xmc[19]  = (*c >> 2) & 0x7; \
-        xmc[20]  = (*c++ & 0x3) << 1; \
-        xmc[20] |= (*c >> 7) & 0x1; \
-        xmc[21]  = (*c >> 4) & 0x7; \
-        xmc[22]  = (*c >> 1) & 0x7; \
-        xmc[23]  = (*c++ & 0x1) << 2; \
-        xmc[23] |= (*c >> 6) & 0x3; \
-        xmc[24]  = (*c >> 3) & 0x7; \
-        xmc[25]  = *c++ & 0x7; \
-        Nc[2]  = (*c >> 1) & 0x7F; \
-        bc[2]  = (*c++ & 0x1) << 1;             /* 20 */ \
-        bc[2] |= (*c >> 7) & 0x1; \
-        Mc[2]  = (*c >> 5) & 0x3; \
-        xmaxc[2]  = (*c++ & 0x1F) << 1; \
-        xmaxc[2] |= (*c >> 7) & 0x1; \
-        xmc[26]  = (*c >> 4) & 0x7; \
-        xmc[27]  = (*c >> 1) & 0x7; \
-        xmc[28]  = (*c++ & 0x1) << 2; \
-        xmc[28] |= (*c >> 6) & 0x3; \
-        xmc[29]  = (*c >> 3) & 0x7; \
-        xmc[30]  = *c++ & 0x7; \
-        xmc[31]  = (*c >> 5) & 0x7; \
-        xmc[32]  = (*c >> 2) & 0x7; \
-        xmc[33]  = (*c++ & 0x3) << 1; \
-        xmc[33] |= (*c >> 7) & 0x1; \
-        xmc[34]  = (*c >> 4) & 0x7; \
-        xmc[35]  = (*c >> 1) & 0x7; \
-        xmc[36]  = (*c++ & 0x1) << 2; \
-        xmc[36] |= (*c >> 6) & 0x3; \
-        xmc[37]  = (*c >> 3) & 0x7; \
-        xmc[38]  = *c++ & 0x7; \
-        Nc[3]  = (*c >> 1) & 0x7F; \
-        bc[3]  = (*c++ & 0x1) << 1; \
-        bc[3] |= (*c >> 7) & 0x1; \
-        Mc[3]  = (*c >> 5) & 0x3; \
-        xmaxc[3]  = (*c++ & 0x1F) << 1; \
-        xmaxc[3] |= (*c >> 7) & 0x1; \
-        xmc[39]  = (*c >> 4) & 0x7; \
-        xmc[40]  = (*c >> 1) & 0x7; \
-        xmc[41]  = (*c++ & 0x1) << 2; \
-        xmc[41] |= (*c >> 6) & 0x3; \
-        xmc[42]  = (*c >> 3) & 0x7; \
-        xmc[43]  = *c++ & 0x7;                  /* 30  */ \
-        xmc[44]  = (*c >> 5) & 0x7; \
-        xmc[45]  = (*c >> 2) & 0x7; \
-        xmc[46]  = (*c++ & 0x3) << 1; \
-        xmc[46] |= (*c >> 7) & 0x1; \
-        xmc[47]  = (*c >> 4) & 0x7; \
-        xmc[48]  = (*c >> 1) & 0x7; \
-        xmc[49]  = (*c++ & 0x1) << 2; \
-        xmc[49] |= (*c >> 6) & 0x3; \
-        xmc[50]  = (*c >> 3) & 0x7; \
-        xmc[51]  = *c & 0x7;                    /* 33 */ \
+		gsm_byte *__c = (c1); \
+        LARc[0]  = (*__c++ & 0xF) << 2;           /* 1 */ \
+        LARc[0] |= (*__c >> 6) & 0x3; \
+        LARc[1]  = *__c++ & 0x3F; \
+        LARc[2]  = (*__c >> 3) & 0x1F; \
+        LARc[3]  = (*__c++ & 0x7) << 2; \
+        LARc[3] |= (*__c >> 6) & 0x3; \
+        LARc[4]  = (*__c >> 2) & 0xF; \
+        LARc[5]  = (*__c++ & 0x3) << 2; \
+        LARc[5] |= (*__c >> 6) & 0x3; \
+        LARc[6]  = (*__c >> 3) & 0x7; \
+        LARc[7]  = *__c++ & 0x7; \
+        Nc[0]  = (*__c >> 1) & 0x7F; \
+        bc[0]  = (*__c++ & 0x1) << 1; \
+        bc[0] |= (*__c >> 7) & 0x1; \
+        Mc[0]  = (*__c >> 5) & 0x3; \
+        xmaxc[0]  = (*__c++ & 0x1F) << 1; \
+        xmaxc[0] |= (*__c >> 7) & 0x1; \
+        xmc[0]  = (*__c >> 4) & 0x7; \
+        xmc[1]  = (*__c >> 1) & 0x7; \
+        xmc[2]  = (*__c++ & 0x1) << 2; \
+        xmc[2] |= (*__c >> 6) & 0x3; \
+        xmc[3]  = (*__c >> 3) & 0x7; \
+        xmc[4]  = *__c++ & 0x7; \
+        xmc[5]  = (*__c >> 5) & 0x7; \
+        xmc[6]  = (*__c >> 2) & 0x7; \
+        xmc[7]  = (*__c++ & 0x3) << 1;            /* 10 */ \
+        xmc[7] |= (*__c >> 7) & 0x1; \
+        xmc[8]  = (*__c >> 4) & 0x7; \
+        xmc[9]  = (*__c >> 1) & 0x7; \
+        xmc[10]  = (*__c++ & 0x1) << 2; \
+        xmc[10] |= (*__c >> 6) & 0x3; \
+        xmc[11]  = (*__c >> 3) & 0x7; \
+        xmc[12]  = *__c++ & 0x7; \
+        Nc[1]  = (*__c >> 1) & 0x7F; \
+        bc[1]  = (*__c++ & 0x1) << 1; \
+        bc[1] |= (*__c >> 7) & 0x1; \
+        Mc[1]  = (*__c >> 5) & 0x3; \
+        xmaxc[1]  = (*__c++ & 0x1F) << 1; \
+        xmaxc[1] |= (*__c >> 7) & 0x1; \
+        xmc[13]  = (*__c >> 4) & 0x7; \
+        xmc[14]  = (*__c >> 1) & 0x7; \
+        xmc[15]  = (*__c++ & 0x1) << 2; \
+        xmc[15] |= (*__c >> 6) & 0x3; \
+        xmc[16]  = (*__c >> 3) & 0x7; \
+        xmc[17]  = *__c++ & 0x7; \
+        xmc[18]  = (*__c >> 5) & 0x7; \
+        xmc[19]  = (*__c >> 2) & 0x7; \
+        xmc[20]  = (*__c++ & 0x3) << 1; \
+        xmc[20] |= (*__c >> 7) & 0x1; \
+        xmc[21]  = (*__c >> 4) & 0x7; \
+        xmc[22]  = (*__c >> 1) & 0x7; \
+        xmc[23]  = (*__c++ & 0x1) << 2; \
+        xmc[23] |= (*__c >> 6) & 0x3; \
+        xmc[24]  = (*__c >> 3) & 0x7; \
+        xmc[25]  = *__c++ & 0x7; \
+        Nc[2]  = (*__c >> 1) & 0x7F; \
+        bc[2]  = (*__c++ & 0x1) << 1;             /* 20 */ \
+        bc[2] |= (*__c >> 7) & 0x1; \
+        Mc[2]  = (*__c >> 5) & 0x3; \
+        xmaxc[2]  = (*__c++ & 0x1F) << 1; \
+        xmaxc[2] |= (*__c >> 7) & 0x1; \
+        xmc[26]  = (*__c >> 4) & 0x7; \
+        xmc[27]  = (*__c >> 1) & 0x7; \
+        xmc[28]  = (*__c++ & 0x1) << 2; \
+        xmc[28] |= (*__c >> 6) & 0x3; \
+        xmc[29]  = (*__c >> 3) & 0x7; \
+        xmc[30]  = *__c++ & 0x7; \
+        xmc[31]  = (*__c >> 5) & 0x7; \
+        xmc[32]  = (*__c >> 2) & 0x7; \
+        xmc[33]  = (*__c++ & 0x3) << 1; \
+        xmc[33] |= (*__c >> 7) & 0x1; \
+        xmc[34]  = (*__c >> 4) & 0x7; \
+        xmc[35]  = (*__c >> 1) & 0x7; \
+        xmc[36]  = (*__c++ & 0x1) << 2; \
+        xmc[36] |= (*__c >> 6) & 0x3; \
+        xmc[37]  = (*__c >> 3) & 0x7; \
+        xmc[38]  = *__c++ & 0x7; \
+        Nc[3]  = (*__c >> 1) & 0x7F; \
+        bc[3]  = (*__c++ & 0x1) << 1; \
+        bc[3] |= (*__c >> 7) & 0x1; \
+        Mc[3]  = (*__c >> 5) & 0x3; \
+        xmaxc[3]  = (*__c++ & 0x1F) << 1; \
+        xmaxc[3] |= (*__c >> 7) & 0x1; \
+        xmc[39]  = (*__c >> 4) & 0x7; \
+        xmc[40]  = (*__c >> 1) & 0x7; \
+        xmc[41]  = (*__c++ & 0x1) << 2; \
+        xmc[41] |= (*__c >> 6) & 0x3; \
+        xmc[42]  = (*__c >> 3) & 0x7; \
+        xmc[43]  = *__c++ & 0x7;                  /* 30  */ \
+        xmc[44]  = (*__c >> 5) & 0x7; \
+        xmc[45]  = (*__c >> 2) & 0x7; \
+        xmc[46]  = (*__c++ & 0x3) << 1; \
+        xmc[46] |= (*__c >> 7) & 0x1; \
+        xmc[47]  = (*__c >> 4) & 0x7; \
+        xmc[48]  = (*__c >> 1) & 0x7; \
+        xmc[49]  = (*__c++ & 0x1) << 2; \
+        xmc[49] |= (*__c >> 6) & 0x3; \
+        xmc[50]  = (*__c >> 3) & 0x7; \
+        xmc[51]  = *__c & 0x7;                    /* 33 */ \
 }
 
 static inline void conv66(gsm_byte * d, wav_byte * c) {
@@ -349,105 +349,105 @@
 }
 
 #define writeGSM_33(c1) { \
-				gsm_byte *c = (c1); \
-                *c++ =   ((GSM_MAGIC & 0xF) << 4)               /* 1 */ \
-                           | ((LARc[0] >> 2) & 0xF); \
-                *c++ =   ((LARc[0] & 0x3) << 6) \
-                           | (LARc[1] & 0x3F); \
-                *c++ =   ((LARc[2] & 0x1F) << 3) \
-                           | ((LARc[3] >> 2) & 0x7); \
-                *c++ =   ((LARc[3] & 0x3) << 6) \
+				gsm_byte *__c = (c1); \
+              *__c++ =   ((GSM_MAGIC & 0xF) << 4)               /* 1 */ \
+                       | ((LARc[0] >> 2) & 0xF); \
+              *__c++ =   ((LARc[0] & 0x3) << 6) \
+                       | (LARc[1] & 0x3F); \
+              *__c++ =   ((LARc[2] & 0x1F) << 3) \
+                       | ((LARc[3] >> 2) & 0x7); \
+              *__c++ =   ((LARc[3] & 0x3) << 6) \
                        | ((LARc[4] & 0xF) << 2) \
                        | ((LARc[5] >> 2) & 0x3); \
-                *c++ =   ((LARc[5] & 0x3) << 6) \
+              *__c++ =   ((LARc[5] & 0x3) << 6) \
                        | ((LARc[6] & 0x7) << 3) \
                        | (LARc[7] & 0x7);   \
-                *c++ =   ((Nc[0] & 0x7F) << 1) \
+              *__c++ =   ((Nc[0] & 0x7F) << 1) \
                        | ((bc[0] >> 1) & 0x1); \
-                *c++ =   ((bc[0] & 0x1) << 7) \
+              *__c++ =   ((bc[0] & 0x1) << 7) \
                        | ((Mc[0] & 0x3) << 5) \
                        | ((xmaxc[0] >> 1) & 0x1F); \
-                *c++ =   ((xmaxc[0] & 0x1) << 7) \
+              *__c++ =   ((xmaxc[0] & 0x1) << 7) \
                        | ((xmc[0] & 0x7) << 4) \
                        | ((xmc[1] & 0x7) << 1) \
-                           | ((xmc[2] >> 2) & 0x1); \
-                *c++ =   ((xmc[2] & 0x3) << 6) \
+                       | ((xmc[2] >> 2) & 0x1); \
+              *__c++ =   ((xmc[2] & 0x3) << 6) \
                        | ((xmc[3] & 0x7) << 3) \
                        | (xmc[4] & 0x7); \
-                *c++ =   ((xmc[5] & 0x7) << 5)                  /* 10 */ \
+              *__c++ =   ((xmc[5] & 0x7) << 5)                  /* 10 */ \
                        | ((xmc[6] & 0x7) << 2) \
                        | ((xmc[7] >> 1) & 0x3); \
-                *c++ =   ((xmc[7] & 0x1) << 7) \
+              *__c++ =   ((xmc[7] & 0x1) << 7) \
                        | ((xmc[8] & 0x7) << 4) \
                        | ((xmc[9] & 0x7) << 1) \
                        | ((xmc[10] >> 2) & 0x1); \
-                *c++ =   ((xmc[10] & 0x3) << 6) \
+              *__c++ =   ((xmc[10] & 0x3) << 6) \
                        | ((xmc[11] & 0x7) << 3) \
                        | (xmc[12] & 0x7); \
-                *c++ =   ((Nc[1] & 0x7F) << 1) \
+              *__c++ =   ((Nc[1] & 0x7F) << 1) \
                        | ((bc[1] >> 1) & 0x1); \
-                *c++ =   ((bc[1] & 0x1) << 7) \
+              *__c++ =   ((bc[1] & 0x1) << 7) \
                        | ((Mc[1] & 0x3) << 5) \
                        | ((xmaxc[1] >> 1) & 0x1F);  \
-                *c++ =   ((xmaxc[1] & 0x1) << 7) \
+              *__c++ =   ((xmaxc[1] & 0x1) << 7) \
                        | ((xmc[13] & 0x7) << 4) \
-                           | ((xmc[14] & 0x7) << 1) \
+                       | ((xmc[14] & 0x7) << 1) \
                        | ((xmc[15] >> 2) & 0x1); \
-                *c++ =   ((xmc[15] & 0x3) << 6) \
+              *__c++ =   ((xmc[15] & 0x3) << 6) \
                        | ((xmc[16] & 0x7) << 3) \
                        | (xmc[17] & 0x7); \
-                *c++ =   ((xmc[18] & 0x7) << 5) \
+              *__c++ =   ((xmc[18] & 0x7) << 5) \
                        | ((xmc[19] & 0x7) << 2) \
                        | ((xmc[20] >> 1) & 0x3); \
-                *c++ =   ((xmc[20] & 0x1) << 7) \
+              *__c++ =   ((xmc[20] & 0x1) << 7) \
                        | ((xmc[21] & 0x7) << 4) \
                        | ((xmc[22] & 0x7) << 1) \
-                           | ((xmc[23] >> 2) & 0x1); \
-                *c++ =   ((xmc[23] & 0x3) << 6) \
+                       | ((xmc[23] >> 2) & 0x1); \
+              *__c++ =   ((xmc[23] & 0x3) << 6) \
                        | ((xmc[24] & 0x7) << 3) \
-                           | (xmc[25] & 0x7); \
-                *c++ =   ((Nc[2] & 0x7F) << 1)                  /* 20 */ \
+                       | (xmc[25] & 0x7); \
+              *__c++ =   ((Nc[2] & 0x7F) << 1)                  /* 20 */ \
                        | ((bc[2] >> 1) & 0x1); \
-                *c++ =   ((bc[2] & 0x1) << 7) \
+              *__c++ =   ((bc[2] & 0x1) << 7) \
                        | ((Mc[2] & 0x3) << 5) \
                        | ((xmaxc[2] >> 1) & 0x1F); \
-                *c++ =   ((xmaxc[2] & 0x1) << 7)   \
+              *__c++ =   ((xmaxc[2] & 0x1) << 7)   \
                        | ((xmc[26] & 0x7) << 4) \
                        | ((xmc[27] & 0x7) << 1) \
                        | ((xmc[28] >> 2) & 0x1); \
-                *c++ =   ((xmc[28] & 0x3) << 6) \
+              *__c++ =   ((xmc[28] & 0x3) << 6) \
                        | ((xmc[29] & 0x7) << 3) \
                        | (xmc[30] & 0x7); \
-                *c++ =   ((xmc[31] & 0x7) << 5) \
+              *__c++ =   ((xmc[31] & 0x7) << 5) \
                        | ((xmc[32] & 0x7) << 2) \
                        | ((xmc[33] >> 1) & 0x3); \
-                *c++ =   ((xmc[33] & 0x1) << 7) \
+              *__c++ =   ((xmc[33] & 0x1) << 7) \
                        | ((xmc[34] & 0x7) << 4) \
                        | ((xmc[35] & 0x7) << 1) \
                        | ((xmc[36] >> 2) & 0x1); \
-                *c++ =   ((xmc[36] & 0x3) << 6) \
-                           | ((xmc[37] & 0x7) << 3) \
+              *__c++ =   ((xmc[36] & 0x3) << 6) \
+                       | ((xmc[37] & 0x7) << 3) \
                        | (xmc[38] & 0x7); \
-                *c++ =   ((Nc[3] & 0x7F) << 1) \
+              *__c++ =   ((Nc[3] & 0x7F) << 1) \
                        | ((bc[3] >> 1) & 0x1); \
-                *c++ =   ((bc[3] & 0x1) << 7)  \
+              *__c++ =   ((bc[3] & 0x1) << 7)  \
                        | ((Mc[3] & 0x3) << 5) \
                        | ((xmaxc[3] >> 1) & 0x1F); \
-                *c++ =   ((xmaxc[3] & 0x1) << 7) \
+              *__c++ =   ((xmaxc[3] & 0x1) << 7) \
                        | ((xmc[39] & 0x7) << 4) \
                        | ((xmc[40] & 0x7) << 1) \
                        | ((xmc[41] >> 2) & 0x1); \
-                *c++ =   ((xmc[41] & 0x3) << 6)                 /* 30 */ \
+              *__c++ =   ((xmc[41] & 0x3) << 6)                 /* 30 */ \
                        | ((xmc[42] & 0x7) << 3) \
                        | (xmc[43] & 0x7); \
-                *c++ =   ((xmc[44] & 0x7) << 5) \
+              *__c++ =   ((xmc[44] & 0x7) << 5) \
                        | ((xmc[45] & 0x7) << 2) \
                        | ((xmc[46] >> 1) & 0x3); \
-                *c++ =   ((xmc[46] & 0x1) << 7) \
+              *__c++ =   ((xmc[46] & 0x1) << 7) \
                        | ((xmc[47] & 0x7) << 4) \
                        | ((xmc[48] & 0x7) << 1) \
                        | ((xmc[49] >> 2) & 0x1); \
-                *c++ =   ((xmc[49] & 0x3) << 6) \
+              *__c++ =   ((xmc[49] & 0x3) << 6) \
                        | ((xmc[50] & 0x7) << 3) \
                            | (xmc[51] & 0x7); \
 }




More information about the asterisk-commits mailing list