Reducing the number of mingw warnings

This commit is contained in:
Cœur 2024-06-02 10:31:11 +08:00 committed by Azat Khuzhin
parent a0fc31bfe3
commit 6d8c38afe7
2 changed files with 6 additions and 4 deletions

View File

@ -158,15 +158,17 @@ main(void)
#ifdef WIN32
WORD wVersionRequested;
WSADATA wsaData;
int err;
/* Use the MAKEWORD(lowbyte, highbyte) macro declared in Windef.h */
wVersionRequested = MAKEWORD(2, 2);
err = WSAStartup(wVersionRequested, &wsaData);
ret = WSAStartup(wVersionRequested, &wsaData);
if (ret != 0) {
mbedtls_printf(
" warning\n ! WSAStartup returned 0x%x\n\n", ret);
}
#endif
#if defined(MBEDTLS_DEBUG_C)
mbedtls_debug_set_threshold(DEBUG_LEVEL);
#endif

View File

@ -854,7 +854,7 @@ static void
test_bufferevent_connect_fail_eventcb(void *arg)
{
struct basic_test_data *data = arg;
int flags = BEV_OPT_CLOSE_ON_FREE | (long)data->setup_data;
int flags = BEV_OPT_CLOSE_ON_FREE | (intptr_t)data->setup_data;
struct event close_listener_event;
struct bufferevent *bev = NULL;
struct evconnlistener *lev = NULL;