Reduce warnings on signedness conversions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
dd161bec3b
commit
b7272182d1
|
@ -694,7 +694,7 @@ static void sms_readfile (sms_t * h, char *fn)
|
||||||
}
|
}
|
||||||
while (fgets (line, sizeof (line), s))
|
while (fgets (line, sizeof (line), s))
|
||||||
{ /* process line in file */
|
{ /* process line in file */
|
||||||
unsigned char *p;
|
char *p;
|
||||||
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
|
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
|
||||||
*p = 0; /* strip eoln */
|
*p = 0; /* strip eoln */
|
||||||
p = line;
|
p = line;
|
||||||
|
@ -1393,11 +1393,11 @@ static int sms_exec (struct ast_channel *chan, void *data)
|
||||||
LOCAL_USER_REMOVE(u);
|
LOCAL_USER_REMOVE(u);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
strncpy (h.queue, d, p - d);
|
strncpy (h.queue, (char *)d, p - d);
|
||||||
if (*p == '|')
|
if (*p == '|')
|
||||||
p++;
|
p++;
|
||||||
d = p;
|
d = p;
|
||||||
for (p = h.queue; *p; p++)
|
for (p = (unsigned char *)h.queue; *p; p++)
|
||||||
if (!isalnum (*p))
|
if (!isalnum (*p))
|
||||||
*p = '-'; /* make very safe for filenames */
|
*p = '-'; /* make very safe for filenames */
|
||||||
while (*d && *d != '|') {
|
while (*d && *d != '|') {
|
||||||
|
@ -1429,20 +1429,20 @@ static int sms_exec (struct ast_channel *chan, void *data)
|
||||||
}
|
}
|
||||||
if (*d == '|') {
|
if (*d == '|') {
|
||||||
/* submitting a message, not taking call. */
|
/* submitting a message, not taking call. */
|
||||||
/* depricated, use smsq instead */
|
/* deprecated, use smsq instead */
|
||||||
d++;
|
d++;
|
||||||
h.scts = time (0);
|
h.scts = time (0);
|
||||||
for (p = d; *p && *p != '|'; p++);
|
for (p = d; *p && *p != '|'; p++);
|
||||||
if (*p)
|
if (*p)
|
||||||
*p++ = 0;
|
*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);
|
ast_log (LOG_ERROR, "Address too long %s\n", d);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (h.smsc) {
|
if (h.smsc) {
|
||||||
ast_copy_string (h.oa, d, sizeof (h.oa));
|
ast_copy_string (h.oa, (char *)d, sizeof (h.oa));
|
||||||
} else {
|
} else {
|
||||||
ast_copy_string (h.da, d, sizeof (h.da));
|
ast_copy_string (h.da, (char *)d, sizeof (h.da));
|
||||||
}
|
}
|
||||||
if (!h.smsc)
|
if (!h.smsc)
|
||||||
ast_copy_string (h.oa, h.cli, sizeof (h.oa));
|
ast_copy_string (h.oa, h.cli, sizeof (h.oa));
|
||||||
|
|
Loading…
Reference in New Issue