Skip to content

Commit a4c60e1

Browse files
committed
Fix Windows compilation warnings
Signed-off-by: Darshan Sen <raisinten@gmail.com>
1 parent 0d93177 commit a4c60e1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/win32/http.cc

+5-4
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class URL {
5959
urlComp_.dwUrlPathLength = (DWORD)-1;
6060
urlComp_.dwExtraInfoLength = (DWORD)-1;
6161

62-
if (WinHttpCrackUrl(url_.c_str(), url_.length(), 0, &urlComp_) == FALSE) {
62+
if (WinHttpCrackUrl(url_.c_str(), static_cast<DWORD>(url_.length()), 0,
63+
&urlComp_) == FALSE) {
6364
DWORD err = GetLastError();
6465
callback("WinHttpCrackUrl Error: " + error_message(err));
6566
return;
@@ -304,7 +305,7 @@ class HTTPClient {
304305
callback_("WinHttpQueryHeaders Error: " + error_message(err));
305306
return;
306307
}
307-
status_ = dwStatusCode;
308+
status_ = static_cast<uint16_t>(dwStatusCode);
308309
}
309310

310311
auto capture_headers() -> void {
@@ -391,8 +392,8 @@ class HTTPClient {
391392
body_ << data;
392393
}
393394

394-
static auto WinHttpStatusCallback(HINTERNET hInternet, DWORD_PTR dwContext,
395-
DWORD dwInternetStatus,
395+
static auto WinHttpStatusCallback(HINTERNET /* hInternet */,
396+
DWORD_PTR dwContext, DWORD dwInternetStatus,
396397
LPVOID lpvStatusInformation,
397398
DWORD dwStatusInformationLength) -> void {
398399
assert(dwContext);

0 commit comments

Comments
 (0)