Skip to content

Commit

Permalink
Fix Windows compilation warnings (#9)
Browse files Browse the repository at this point in the history
Signed-off-by: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
RaisinTen committed Apr 5, 2024
1 parent 0d93177 commit adbb9f8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/win32/http.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class URL {
urlComp_.dwUrlPathLength = (DWORD)-1;
urlComp_.dwExtraInfoLength = (DWORD)-1;

if (WinHttpCrackUrl(url_.c_str(), url_.length(), 0, &urlComp_) == FALSE) {
if (WinHttpCrackUrl(url_.c_str(), static_cast<DWORD>(url_.length()), 0,
&urlComp_) == FALSE) {
DWORD err = GetLastError();
callback("WinHttpCrackUrl Error: " + error_message(err));
return;
Expand Down Expand Up @@ -304,7 +305,7 @@ class HTTPClient {
callback_("WinHttpQueryHeaders Error: " + error_message(err));
return;
}
status_ = dwStatusCode;
status_ = static_cast<uint16_t>(dwStatusCode);
}

auto capture_headers() -> void {
Expand Down Expand Up @@ -391,8 +392,8 @@ class HTTPClient {
body_ << data;
}

static auto WinHttpStatusCallback(HINTERNET hInternet, DWORD_PTR dwContext,
DWORD dwInternetStatus,
static auto WinHttpStatusCallback(HINTERNET /* hInternet */,
DWORD_PTR dwContext, DWORD dwInternetStatus,
LPVOID lpvStatusInformation,
DWORD dwStatusInformationLength) -> void {
assert(dwContext);
Expand Down

0 comments on commit adbb9f8

Please sign in to comment.