diff --git a/apps/app_sms.c b/apps/app_sms.c index 4c15cc185f..3f91477e5d 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -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));