Shortening an integer to an unsigned char can lead to a situation where the bottom 8 bits of the integer are all zeroes but the integer is actually truthy. Using a ternary operator removes the ambiguity and solves compiler warnings
@@ -8772,7 +8772,7 @@ struct mg_connection *mg_connect_client(
__func__,
strerror(ERRNO));
}
- conn->client.is_ssl = use_ssl;
+ conn->client.is_ssl = use_ssl ? 1 : 0;
(void)pthread_mutex_init(&conn->mutex, NULL);
#ifndef NO_SSL
if (use_ssl) {