summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--call/yapp.c10
-rw-r--r--listen/listen.c6
-rw-r--r--listen/listen.h2
-rw-r--r--listen/rosedump.c6
-rw-r--r--listen/utils.c2
5 files changed, 13 insertions, 13 deletions
diff --git a/call/yapp.c b/call/yapp.c
index 3d7bf45..8260ab0 100644
--- a/call/yapp.c
+++ b/call/yapp.c
@@ -288,13 +288,13 @@ static int yapp_download_data(int *filefd, unsigned char *buffer)
case STATE_RH:
if (buffer[0] == SOH) {
/* Parse header: 3 fields == YAPP C */
- char *hptr, *hfield[3];
+ unsigned char *hptr, *hfield[3];
if ((length = buffer[1]) == 0)
length = 256;
hptr = buffer + 2;
while (length > 0) {
int hlen;
- hlen = strlen(hptr) + 1;
+ hlen = strlen((char *)hptr) + 1;
hfield[(int) yappc++] = hptr;
hptr += hlen;
length -= hlen;
@@ -303,13 +303,13 @@ static int yapp_download_data(int *filefd, unsigned char *buffer)
if (yappc < 3) {
yappc = 0;
} else {
- file_time = yapp2unix(hfield[2]);
+ file_time = yapp2unix((char *)hfield[2]);
yappc = 1;
}
if (*filefd == -1) {
if ((*filefd =
- open(hfield[0],
+ open((char *)hfield[0],
O_RDWR | O_APPEND | O_CREAT,
0666)) == -1) {
printf("\n[Unable to open %s]\n",
@@ -549,7 +549,7 @@ static int yapp_upload_data(int filefd, char *filename, int filelength,
len = buffer[1];
if (buffer[len] == 'C')
yappc = 1;
- rpos = atol(buffer + 4);
+ rpos = atol((char *)buffer + 4);
lseek(filefd, rpos, SEEK_SET);
buffer[0] = ACK;
buffer[1] = yappc ? ACK : 0x02;
diff --git a/listen/listen.c b/listen/listen.c
index 11f365e..bf60281 100644
--- a/listen/listen.c
+++ b/listen/listen.c
@@ -216,7 +216,7 @@ int main(int argc, char **argv)
static void ascii_dump(unsigned char *data, int length)
{
- unsigned char c;
+ char c;
int i, j;
char buf[100];
@@ -272,9 +272,9 @@ static void readable_dump(unsigned char *data, int length)
static void hex_dump(unsigned char *data, int length)
{
+ unsigned char *data2;
int i, j, length2;
unsigned char c;
- char *data2;
char buf[4], hexd[49], ascd[17];
@@ -309,7 +309,7 @@ static void hex_dump(unsigned char *data, int length)
}
}
-void data_dump(unsigned char *data, int length, int dumpstyle)
+void data_dump(void *data, int length, int dumpstyle)
{
switch (dumpstyle) {
diff --git a/listen/listen.h b/listen/listen.h
index 73a5d06..841a494 100644
--- a/listen/listen.h
+++ b/listen/listen.h
@@ -28,7 +28,7 @@ int initcolor(void);
char *servname(int port, char *proto);
/* In listen.c */
-void data_dump(unsigned char *, int, int);
+void data_dump(void *, int, int);
int get16(unsigned char *);
int get32(unsigned char *);
diff --git a/listen/rosedump.c b/listen/rosedump.c
index c9beaee..e8f8fdc 100644
--- a/listen/rosedump.c
+++ b/listen/rosedump.c
@@ -324,7 +324,7 @@ static void facility(unsigned char *data, int lgtot)
char digis[80], digid[80];
char indorig[10], inddest[10];
char addstorig[20], addstdest[20];
- char *d, *factot;
+ unsigned char *d, *factot;
char buf[512];
char *result = buf;
@@ -435,10 +435,10 @@ static void facility(unsigned char *data, int lgtot)
lgadind = lgaddcall - (lgad + 1) / 2 - 5;
if (fct == 0xCB) {
- strncpy(indorig, data, lgadind);
+ strncpy(indorig, (char *)data, lgadind);
indorig[lgadind] = '\0';
} else {
- strncpy(inddest, data, lgadind);
+ strncpy(inddest, (char *)data, lgadind);
inddest[lgadind] = '\0';
}
diff --git a/listen/utils.c b/listen/utils.c
index 8f522e5..667bab7 100644
--- a/listen/utils.c
+++ b/listen/utils.c
@@ -38,8 +38,8 @@ void lprintf(int dtype, char *fmt, ...)
{
va_list args;
char str[1024];
- unsigned char *p;
chtype ch;
+ char *p;
va_start(args, fmt);
vsnprintf(str, 1024, fmt, args);