1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

warning C4244: '=' : conversion from '*' to '*', possible loss of data

This commit is contained in:
Лужецкий 2014-09-02 13:51:34 +04:00
parent 635229246a
commit 2ce456b247
4 changed files with 7 additions and 7 deletions

View file

@ -140,7 +140,7 @@ lws_plat_service(struct libwebsocket_context *context, int timeout_ms)
return -1;
}
pfd->revents = networkevents.lNetworkEvents;
pfd->revents = (SHORT)networkevents.lNetworkEvents;
if (pfd->revents & LWS_POLLOUT)
context->lws_lookup[pfd->fd]->sock_send_blocking = FALSE;

View file

@ -342,7 +342,7 @@ LWS_VISIBLE int libwebsocket_write(struct libwebsocket *wsi, unsigned char *buf,
/* reason codes count as data bytes */
buf -= 2;
buf[0] = wsi->u.ws.close_reason >> 8;
buf[1] = wsi->u.ws.close_reason;
buf[1] = (unsigned char)wsi->u.ws.close_reason;
len += 2;
}
break;

View file

@ -185,9 +185,9 @@ callback_fraggle(struct libwebsocket_context *context,
psf->total_message, psf->sum);
bp[0] = psf->sum >> 24;
bp[1] = psf->sum >> 16;
bp[2] = psf->sum >> 8;
bp[3] = psf->sum;
bp[1] = 0xff & (psf->sum >> 16);
bp[2] = 0xff & (psf->sum >> 8);
bp[3] = 0xff & (psf->sum);
n = libwebsocket_write(wsi, (unsigned char *)bp,
4, LWS_WRITE_BINARY);

View file

@ -226,7 +226,7 @@ callback_lws_mirror(struct libwebsocket_context * this,
/* 64-bit ping index in network byte order */
while (shift >= 0) {
*p++ = psd->ping_index >> shift;
*p++ = (unsigned char)psd->ping_index >> shift;
shift -= 8;
}
@ -375,7 +375,7 @@ int main(int argc, char **argv)
protocols[PROTOCOL_LWS_MIRROR].name = protocol_name;
break;
case 'i':
interval_us = 1000000.0 * atof(optarg);
interval_us = (unsigned int)(1000000.0 * atof(optarg));
break;
case 's':
size = atoi(optarg);