Reduce warnings on signedness conversions
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 27 Dec 2005 02:05:56 +0000 (02:05 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 27 Dec 2005 02:05:56 +0000 (02:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7643 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_sms.c

index 4c15cc1..3f91477 100644 (file)
@@ -694,7 +694,7 @@ static void sms_readfile (sms_t * h, char *fn)
                }
                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 @@ static int sms_exec (struct ast_channel *chan, void *data)
                        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 @@ static int sms_exec (struct ast_channel *chan, void *data)
                }
                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));