Skip to content

Commit e62f6c2

Browse files
committed
Fix Linux compilation warnings
Signed-off-by: Darshan Sen <raisinten@gmail.com>
1 parent adbb9f8 commit e62f6c2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/linux/http.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ auto stream_close_callback(GObject *source_object, GAsyncResult *res,
4343
soup_message_headers_foreach(
4444
async_http_context->message->response_headers,
4545
[](const char *name, const char *value, gpointer user_data) {
46-
auto &headers =
46+
auto &headers_alias =
4747
*static_cast<std::map<std::string, std::string> *>(user_data);
4848

4949
// Splitting the header value by commas (common delimiter)
5050
std::istringstream value_stream(value);
5151
std::string single_value;
5252
while (std::getline(value_stream, single_value, ',')) {
53-
headers.emplace(name, single_value);
53+
headers_alias.emplace(name, single_value);
5454
}
5555
},
5656
&headers);
@@ -90,7 +90,8 @@ auto stream_read_callback(GObject *source_object, GAsyncResult *res,
9090
assert(bytes_read > 0);
9191

9292
for (gssize i = 0; i < bytes_read; ++i) {
93-
async_http_context->response << async_http_context->buffer[i];
93+
async_http_context->response
94+
<< async_http_context->buffer[static_cast<std::size_t>(i)];
9495
}
9596

9697
g_input_stream_read_async(stream, async_http_context->buffer.data(),

0 commit comments

Comments
 (0)