Commit 072833ac authored by Sergey Lyubka's avatar Sergey Lyubka

Squashed win32 warnings

parent a5aa08e4
...@@ -1478,7 +1478,8 @@ int mg_websocket_write(struct mg_connection* conn, int opcode, ...@@ -1478,7 +1478,8 @@ int mg_websocket_write(struct mg_connection* conn, int opcode,
} else { } else {
// 64-bit length field // 64-bit length field
copy[1] = 127; copy[1] = 127;
* (uint32_t *) (copy + 2) = (uint32_t) htonl((uint64_t) data_len >> 32); * (uint32_t *) (copy + 2) = (uint32_t)
htonl((uint32_t) ((uint64_t) data_len >> 32));
* (uint32_t *) (copy + 6) = (uint32_t) htonl(data_len & 0xffffffff); * (uint32_t *) (copy + 6) = (uint32_t) htonl(data_len & 0xffffffff);
memcpy(copy + 10, data, data_len); memcpy(copy + 10, data, data_len);
copy_len = 10 + data_len; copy_len = 10 + data_len;
...@@ -3097,8 +3098,8 @@ static void close_local_endpoint(struct connection *conn) { ...@@ -3097,8 +3098,8 @@ static void close_local_endpoint(struct connection *conn) {
static void transfer_file_data(struct connection *conn) { static void transfer_file_data(struct connection *conn) {
char buf[IOBUF_SIZE]; char buf[IOBUF_SIZE];
int n = read(conn->endpoint.fd, buf, int n = read(conn->endpoint.fd, buf, conn->cl < (int64_t) sizeof(buf) ?
conn->cl < (int64_t) sizeof(buf) ? conn->cl : (int) sizeof(buf)); (int) conn->cl : (int) sizeof(buf));
if (is_error(n)) { if (is_error(n)) {
close_local_endpoint(conn); close_local_endpoint(conn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment