[Asterisk-cvs] asterisk/res res_adsi.c, 1.15, 1.16 res_features.c,
1.68, 1.69
kpfleming
kpfleming
Wed Sep 7 14:54:43 CDT 2005
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv30428/res
Modified Files:
res_adsi.c res_features.c
Log Message:
eliminate signedness warnings (issue #5129)
Index: res_adsi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_adsi.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- res_adsi.c 8 Aug 2005 01:16:44 -0000 1.15
+++ res_adsi.c 7 Sep 2005 18:55:03 -0000 1.16
@@ -306,7 +306,7 @@
}
-int adsi_begin_download(struct ast_channel *chan, unsigned char *service, unsigned char *fdn, unsigned char *sec, int version)
+int adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
{
int bytes;
unsigned char buf[256];
@@ -428,7 +428,7 @@
return x;
}
-int adsi_load_soft_key(unsigned char *buf, int key, unsigned char *llabel, unsigned char *slabel, unsigned char *ret, int data)
+int adsi_load_soft_key(unsigned char *buf, int key, char *llabel, char *slabel, char *ret, int data)
{
int bytes=0;
@@ -442,13 +442,13 @@
buf[bytes++] = key;
/* Carefully copy long label */
- bytes += ccopy(buf + bytes, llabel, 18);
+ bytes += ccopy(buf + bytes, (unsigned char *)llabel, 18);
/* Place delimiter */
buf[bytes++] = 0xff;
/* Short label */
- bytes += ccopy(buf + bytes, slabel, 7);
+ bytes += ccopy(buf + bytes, (unsigned char *)slabel, 7);
/* If specified, copy return string */
@@ -458,7 +458,7 @@
if (data)
buf[bytes++] = ADSI_SWITCH_TO_DATA2;
/* Carefully copy return string */
- bytes += ccopy(buf + bytes, ret, 20);
+ bytes += ccopy(buf + bytes, (unsigned char *)ret, 20);
}
/* Replace parameter length */
@@ -490,7 +490,7 @@
}
-int adsi_download_connect(unsigned char *buf, unsigned char *service, unsigned char *fdn, unsigned char *sec, int ver)
+int adsi_download_connect(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
{
int bytes=0;
int x;
@@ -502,7 +502,7 @@
bytes++;
/* Primary column */
- bytes+= ccopy(buf + bytes, service, 18);
+ bytes+= ccopy(buf + bytes, (unsigned char *)service, 18);
/* Delimiter */
buf[bytes++] = 0xff;
@@ -774,7 +774,7 @@
}
int adsi_display(unsigned char *buf, int page, int line, int just, int wrap,
- unsigned char *col1, unsigned char *col2)
+ char *col1, char *col2)
{
int bytes=0;
@@ -804,13 +804,13 @@
buf[bytes++] = 0xff;
/* Primary column */
- bytes+= ccopy(buf + bytes, col1, 20);
+ bytes+= ccopy(buf + bytes, (unsigned char *)col1, 20);
/* Delimiter */
buf[bytes++] = 0xff;
/* Secondary column */
- bytes += ccopy(buf + bytes, col2, 20);
+ bytes += ccopy(buf + bytes, (unsigned char *)col2, 20);
/* Update length */
buf[1] = bytes - 2;
@@ -842,7 +842,7 @@
}
-int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, unsigned char *format1, unsigned char *format2)
+int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
{
int bytes = 0;
@@ -852,10 +852,10 @@
buf[bytes++] = ADSI_INPUT_FORMAT;
bytes++;
buf[bytes++] = ((dir & 1) << 7) | ((wrap & 1) << 6) | (num & 0x7);
- bytes += ccopy(buf + bytes, format1, 20);
+ bytes += ccopy(buf + bytes, (unsigned char *)format1, 20);
buf[bytes++] = 0xff;
if (format2 && strlen((char *)format2)) {
- bytes += ccopy(buf + bytes, format2, 20);
+ bytes += ccopy(buf + bytes, (unsigned char *)format2, 20);
}
buf[1] = bytes - 2;
return bytes;
@@ -934,14 +934,14 @@
}
-int adsi_print(struct ast_channel *chan, unsigned char **lines, int *aligns, int voice)
+int adsi_print(struct ast_channel *chan, char **lines, int *aligns, int voice)
{
unsigned char buf[4096];
int bytes=0;
int res;
int x;
for(x=0;lines[x];x++)
- bytes += adsi_display(buf + bytes, ADSI_INFO_PAGE, x+1, aligns[x], 0, lines[x], (unsigned char *)"");
+ bytes += adsi_display(buf + bytes, ADSI_INFO_PAGE, x+1, aligns[x], 0, lines[x], "");
bytes += adsi_set_line(buf + bytes, ADSI_INFO_PAGE, 1);
if (voice) {
bytes += adsi_voice_mode(buf + bytes, 0);
Index: res_features.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_features.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- res_features.c 23 Aug 2005 15:33:27 -0000 1.68
+++ res_features.c 7 Sep 2005 18:55:03 -0000 1.69
@@ -248,10 +248,10 @@
int res;
int justify[5] = {ADSI_JUST_CENT, ADSI_JUST_CENT, ADSI_JUST_CENT, ADSI_JUST_CENT};
char tmp[256] = "";
- unsigned char *message[5] = {NULL, NULL, NULL, NULL, NULL};
+ char *message[5] = {NULL, NULL, NULL, NULL, NULL};
snprintf(tmp, sizeof(tmp), "Parked on %d", parkingnum);
- message[0] = (unsigned char *)tmp;
+ message[0] = tmp;
res = adsi_load_session(chan, NULL, 0, 1);
if (res == -1) {
return res;
More information about the svn-commits
mailing list