summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-06 11:13:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-06 11:13:42 +0000
commit4cf8d843e758b11eb1c6156f9aeeb46d1810b61b (patch)
tree6b1c4e515402b8f903a7b4a9137acc6b953c64b9
parent77778c2b9236077c7e79f06aa798affa2f90a1db (diff)
no more warnings in libyahoo
git-svn-id: http://svn.miranda-ng.org/main/trunk@14024 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/Yahoo/src/libyahoo2/libyahoo2.cpp18
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp24
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo_util.cpp4
3 files changed, 23 insertions, 23 deletions
diff --git a/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp b/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp
index 58e21a74a7..f4c60152c5 100644
--- a/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp
+++ b/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp
@@ -759,7 +759,7 @@ static int yahoo_packet_length(struct yahoo_packet *pkt)
len++;
} while (tmp);
len += 2;
- len += strlen(pair->value);
+ len += (int)strlen(pair->value);
len += 2;
}
@@ -797,7 +797,7 @@ static void yahoo_packet_read(struct yahoo_packet *pkt, unsigned char *data, int
snprintf(z, sizeof(z), "%s ]=-", z);
- zl = strlen(z);
+ zl = (int)strlen(z);
DEBUG_MSG1((z));
while (pos + 1 < len) {
@@ -866,12 +866,12 @@ static void yahoo_packet_write(struct yahoo_packet *pkt, unsigned char *data)
snprintf((char *)buf, sizeof(buf), "%d", pair->key);
strcpy((char *)data + pos, (char *)buf);
- pos += strlen((char *)buf);
+ pos += (int)strlen((char *)buf);
data[pos++] = 0xc0;
data[pos++] = 0x80;
strcpy((char *)data + pos, pair->value);
- pos += strlen(pair->value);
+ pos += (int)strlen(pair->value);
data[pos++] = 0xc0;
data[pos++] = 0x80;
}
@@ -3629,7 +3629,7 @@ static void _yahoo_webcam_get_server_connected(INT_PTR fd, int error, void *d)
data = strdup("<RVWCFG>");
else
data = strdup("<RUPCFG>");
- yahoo_add_to_send_queue(yid, data, strlen(data));
+ yahoo_add_to_send_queue(yid, data, (int)strlen(data));
FREE(data);
/* send data */
@@ -3641,7 +3641,7 @@ static void _yahoo_webcam_get_server_connected(INT_PTR fd, int error, void *d)
} else {
data = strdup("f=1\r\n");
}
- len = strlen(data);
+ len = (int)strlen(data);
packet = y_new0(char, header_len + len);
packet[pos++] = header_len;
memcpy(packet + pos, magic_nr, sizeof(magic_nr));
@@ -4534,7 +4534,7 @@ static void _yahoo_webcam_connected(INT_PTR fd, int error, void *d)
default:
return;
}
- yahoo_add_to_send_queue(yid, data, strlen(data));
+ yahoo_add_to_send_queue(yid, data, (int)strlen(data));
FREE(data);
/* send data */
@@ -4572,7 +4572,7 @@ static void _yahoo_webcam_connected(INT_PTR fd, int error, void *d)
break;
}
- len = strlen(data);
+ len = (int)strlen(data);
packet = y_new0(char, header_len + len);
packet[pos++] = header_len;
packet[pos++] = 0;
@@ -5906,7 +5906,7 @@ void yahoo_webcam_accept_viewer(int id, const char* who, int accept)
data = strdup("u=");
data = y_string_append(data, (char*)who);
data = y_string_append(data, "\r\n");
- len = strlen(data);
+ len = (int)strlen(data);
packet = y_new0(char, header_len + len);
packet[pos++] = header_len;
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp
index 2f3a8d1485..58005e440d 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp
+++ b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp
@@ -156,7 +156,7 @@ char *yahoo_urlencode(const char *instr)
{
int ipos=0, bpos=0;
char *str = NULL;
- int len = strlen(instr);
+ int len = (int)strlen(instr);
if (!(str = y_new(char, 3*len + 1)))
return "";
@@ -174,7 +174,7 @@ char *yahoo_urlencode(const char *instr)
str[bpos]='\0';
/* free extra alloc'ed mem. */
- len = strlen(str);
+ len = (int)strlen(str);
str = y_renew(char, str, len+1);
return (str);
@@ -186,7 +186,7 @@ char *yahoo_urldecode(const char *instr)
char *str = NULL;
char entity[3]={0,0,0};
unsigned dec;
- int len = strlen(instr);
+ int len = (int)strlen(instr);
if (!(str = y_new(char, len+1)))
return "";
@@ -214,7 +214,7 @@ char *yahoo_urldecode(const char *instr)
str[bpos]='\0';
/* free extra alloc'ed mem. */
- len = strlen(str);
+ len = (int)strlen(str);
str = y_renew(char, str, len+1);
return (str);
@@ -233,7 +233,7 @@ char *yahoo_xmldecode(const char *instr)
{"nbsp;", " "}
};
unsigned dec;
- int len = strlen(instr);
+ int len = (int)strlen(instr);
if (!(str = y_new(char, len+1)))
return "";
@@ -257,13 +257,13 @@ char *yahoo_xmldecode(const char *instr)
sscanf(entity, "%u", &dec);
str[bpos++] = (char)dec;
ipos++;
- } else {
+ }
+ else {
int i;
for (i=0; i<5; i++)
- if (!strncmp(instr+ipos, entitymap[i][0],
- strlen(entitymap[i][0]))) {
- str[bpos++] = entitymap[i][1][0];
- ipos += strlen(entitymap[i][0]);
+ if (!strncmp(instr + ipos, entitymap[i][0], strlen(entitymap[i][0]))) {
+ str[bpos++] = entitymap[i][1][0];
+ ipos += (int)strlen(entitymap[i][0]);
break;
}
}
@@ -271,7 +271,7 @@ char *yahoo_xmldecode(const char *instr)
str[bpos]='\0';
/* free extra alloc'ed mem. */
- len = strlen(str);
+ len = (int)strlen(str);
str = y_renew(char, str, len+1);
return (str);
@@ -291,7 +291,7 @@ static void connect_complete(INT_PTR fd, int error, void *data)
struct callback_data *ccd = (struct callback_data *) data;
if (error == 0 && fd > 0)
- write(fd, ccd->request, strlen(ccd->request));
+ write(fd, ccd->request, (int)strlen(ccd->request));
FREE(ccd->request);
ccd->callback(ccd->id, fd, error, ccd->user_data);
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp b/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
index 659cb4e6a9..63149f3821 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
+++ b/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
@@ -41,7 +41,7 @@ char *strchr (), *strrchr ();
char * y_string_append(char * string, char * append)
{
- int size = strlen(string) + strlen(append) + 1;
+ int size = (int)strlen(string) + (int)strlen(append) + 1;
char * new_string = y_renew(char, string, size);
if (new_string == NULL) {
@@ -121,7 +121,7 @@ char ** y_strsplit(char * str, char * sep, int nelem)
char ** vector;
char *s, *p;
int i=0;
- int l = strlen(sep);
+ int l = (int)strlen(sep);
if (nelem <= 0) {
char * s;
nelem=0;