mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
win fix warnings from appveyor
Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
parent
0463895b1b
commit
7a9970f90d
6 changed files with 10 additions and 9 deletions
|
@ -447,7 +447,7 @@ lws_create_vhost(struct lws_context *context,
|
|||
#ifdef LWS_WITH_ACCESS_LOG
|
||||
if (info->log_filepath) {
|
||||
vh->log_fd = open(info->log_filepath, O_CREAT | O_APPEND | O_RDWR, 0600);
|
||||
if (vh->log_fd == LWS_INVALID_FILE) {
|
||||
if (vh->log_fd == (int)LWS_INVALID_FILE) {
|
||||
lwsl_err("unable to open log filepath %s\n",
|
||||
info->log_filepath);
|
||||
goto bail;
|
||||
|
@ -460,7 +460,7 @@ lws_create_vhost(struct lws_context *context,
|
|||
info->log_filepath);
|
||||
#endif
|
||||
} else
|
||||
vh->log_fd = LWS_INVALID_FILE;
|
||||
vh->log_fd = (int)LWS_INVALID_FILE;
|
||||
#endif
|
||||
|
||||
if (lws_context_init_server_ssl(info, vh))
|
||||
|
@ -940,7 +940,7 @@ lws_context_destroy(struct lws_context *context)
|
|||
#endif
|
||||
#endif
|
||||
#ifdef LWS_WITH_ACCESS_LOG
|
||||
if (vh->log_fd != LWS_INVALID_FILE)
|
||||
if (vh->log_fd != (int)LWS_INVALID_FILE)
|
||||
close(vh->log_fd);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ lws_libuv_destroyloop(struct lws_context *context, int tsi)
|
|||
}
|
||||
|
||||
void
|
||||
lws_libuv_accept(struct lws *wsi, int accept_fd)
|
||||
lws_libuv_accept(struct lws *wsi, lws_sockfd_type accept_fd)
|
||||
{
|
||||
struct lws_context *context = lws_get_context(wsi);
|
||||
struct lws_context_per_thread *pt = &context->pt[(int)wsi->tsi];
|
||||
|
|
|
@ -2343,7 +2343,7 @@ lws_access_log(struct lws *wsi)
|
|||
wsi->access_log.header_log,
|
||||
wsi->access_log.response, wsi->access_log.sent, p);
|
||||
|
||||
if (wsi->vhost->log_fd != LWS_INVALID_FILE) {
|
||||
if (wsi->vhost->log_fd != (int)LWS_INVALID_FILE) {
|
||||
if (write(wsi->vhost->log_fd, ass, l) != l)
|
||||
lwsl_err("Failed to write log\n");
|
||||
} else
|
||||
|
@ -2448,7 +2448,7 @@ lws_json_dump_vhost(const struct lws_vhost *vh, char *buf, int len)
|
|||
if (!first)
|
||||
buf += snprintf(buf, end - buf, ",");
|
||||
buf += snprintf(buf, end - buf,
|
||||
"\n {\n \"%s\":\{\n"
|
||||
"\n {\n \"%s\":{\n"
|
||||
" \"status\":\"ok\"\n }\n }"
|
||||
,
|
||||
vh->protocols[n].name);
|
||||
|
|
|
@ -674,7 +674,7 @@ lws_http_action(struct lws *wsi)
|
|||
*/
|
||||
if (hit->origin_protocol == LWSMPRO_CALLBACK) {
|
||||
|
||||
for (n = 0; n < wsi->vhost->count_protocols; n++)
|
||||
for (n = 0; n < (unsigned int)wsi->vhost->count_protocols; n++)
|
||||
if (!strcmp(wsi->vhost->protocols[n].name,
|
||||
hit->origin)) {
|
||||
|
||||
|
|
|
@ -378,7 +378,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
|||
break;
|
||||
case LEJPVP_MOUNTPOINT:
|
||||
a->m.mountpoint = a->p;
|
||||
a->m.mountpoint_len = strlen(ctx->buf);
|
||||
a->m.mountpoint_len = (unsigned char)strlen(ctx->buf);
|
||||
break;
|
||||
case LEJPVP_ORIGIN:
|
||||
a->m.origin = a->p;
|
||||
|
|
|
@ -229,7 +229,8 @@ int main(int argc, char **argv)
|
|||
info.port = 7681;
|
||||
|
||||
while (n >= 0) {
|
||||
n = getopt_long(argc, argv, "i:hsap:d:Dr:C:K:A:R:vu:g:", options, NULL);
|
||||
n = getopt_long(argc, argv, "i:hsap:d:Dr:C:K:A:R:vu:g:",
|
||||
(struct option *)options, NULL);
|
||||
if (n < 0)
|
||||
continue;
|
||||
switch (n) {
|
||||
|
|
Loading…
Add table
Reference in a new issue