[asterisk-commits] trunk - r7643 /trunk/apps/app_sms.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Dec 26 20:05:57 CST 2005


Author: tilghman
Date: Mon Dec 26 20:05:56 2005
New Revision: 7643

URL: http://svn.digium.com/view/asterisk?rev=7643&view=rev
Log:
Reduce warnings on signedness conversions

Modified:
    trunk/apps/app_sms.c

Modified: trunk/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_sms.c?rev=7643&r1=7642&r2=7643&view=diff
==============================================================================
--- trunk/apps/app_sms.c (original)
+++ trunk/apps/app_sms.c Mon Dec 26 20:05:56 2005
@@ -694,7 +694,7 @@
 		}
 		while (fgets (line, sizeof (line), s))
 		{								 /* process line in file */
-			unsigned char *p;
+			char *p;
 			for (p = line; *p && *p != '\n' && *p != '\r'; p++);
 			*p = 0;					 /* strip eoln */
 			p = line;
@@ -1393,11 +1393,11 @@
 			LOCAL_USER_REMOVE(u);
 			return -1;
 		}
-		strncpy (h.queue, d, p - d);
+		strncpy (h.queue, (char *)d, p - d);
 		if (*p == '|')
 			p++;
 		d = p;
-		for (p = h.queue; *p; p++)
+		for (p = (unsigned char *)h.queue; *p; p++)
 			if (!isalnum (*p))
 				*p = '-';			  /* make very safe for filenames */
 		while (*d && *d != '|') {
@@ -1429,20 +1429,20 @@
 		}
 		if (*d == '|') {
 			/* submitting a message, not taking call. */
-			/* depricated, use smsq instead */
+			/* deprecated, use smsq instead */
 			d++;
 			h.scts = time (0);
 			for (p = d; *p && *p != '|'; p++);
 			if (*p)
 				*p++ = 0;
-			if (strlen (d) >= sizeof (h.oa)) {
+			if (strlen ((char *)d) >= sizeof (h.oa)) {
 				ast_log (LOG_ERROR, "Address too long %s\n", d);
 				return 0;
 			}
 			if (h.smsc) {
-				ast_copy_string (h.oa, d, sizeof (h.oa));
+				ast_copy_string (h.oa, (char *)d, sizeof (h.oa));
 			} else {
-				ast_copy_string (h.da, d, sizeof (h.da));
+				ast_copy_string (h.da, (char *)d, sizeof (h.da));
 			}
 			if (!h.smsc)
 				ast_copy_string (h.oa, h.cli, sizeof (h.oa));



More information about the asterisk-commits mailing list