You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libwebsock_context is defined as: typedef struct _libwebsock_context { int running; int ssl_init; int flags; int owns_base; ev_uintptr_t *socketfd; struct event_base *base; int (*onmessage)(libwebsock_client_state *, libwebsock_message *); int (*control_callback)(libwebsock_client_state *, libwebsock_frame *); int (*onopen)(libwebsock_client_state *); int (*onclose)(libwebsock_client_state *); int (*onpong)(libwebsock_client_state *); int (*onframetoolarge)(libwebsock_client_state *, libwebsock_frame *); libwebsock_client_state *clients_HEAD; void *user_data; unsigned int max_frame_payload_size; } libwebsock_context;
However, on line 202 in api.c we have : ctx->socketfd = sockfd; // Set the socketfd on the context so user can thread the context
which generates a compiler warning:
api.c:202:19: warning: assignment makes pointer from integer without a cast [enabled by default]
Shouldn't ctx->socketfd be defined as evutil_socket_t socketfd
rather than ev_uintptr_t *socketfd?
This is the only place where ctx-socketfd is use AFAIK.
The text was updated successfully, but these errors were encountered:
libwebsock_context is defined as:
typedef struct _libwebsock_context { int running; int ssl_init; int flags; int owns_base; ev_uintptr_t *socketfd; struct event_base *base; int (*onmessage)(libwebsock_client_state *, libwebsock_message *); int (*control_callback)(libwebsock_client_state *, libwebsock_frame *); int (*onopen)(libwebsock_client_state *); int (*onclose)(libwebsock_client_state *); int (*onpong)(libwebsock_client_state *); int (*onframetoolarge)(libwebsock_client_state *, libwebsock_frame *); libwebsock_client_state *clients_HEAD; void *user_data; unsigned int max_frame_payload_size; } libwebsock_context;
However, on line 202 in api.c we have :
ctx->socketfd = sockfd; // Set the socketfd on the context so user can thread the context
which generates a compiler warning:
api.c:202:19: warning: assignment makes pointer from integer without a cast [enabled by default]
Shouldn't ctx->socketfd be defined as
evutil_socket_t socketfd
rather than
ev_uintptr_t *socketfd
?This is the only place where ctx-socketfd is use AFAIK.
The text was updated successfully, but these errors were encountered: