Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Gouache committed Oct 1, 2024
1 parent da595bf commit d3268a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ini.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ class INIWriter {
}
}
if (!linesToAdd.empty()) {
output.insert(output.begin() + lastKeyLine, linesToAdd.begin(),
output.insert(output.begin() + static_cast<int64_t>(lastKeyLine), linesToAdd.begin(),
linesToAdd.end());
}
if (writeNewKeys) {
Expand Down
9 changes: 6 additions & 3 deletions src/s3plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,11 @@ int driver_connect()
Aws::InitAPI(options);

Aws::Client::ClientConfiguration clientConfig(true, "legacy", true);
clientConfig.allowSystemProxy = getenv("http_proxy") != NULL || getenv("https_proxy") != NULL ||
getenv("HTTP_PROXY") != NULL || getenv("HTTPS_PROXY") != NULL || getenv("S3_ALLOW_SYSTEM_PROXY");
clientConfig.allowSystemProxy = !GetEnvironmentVariableOrDefault("http_proxy", "").empty() ||
!GetEnvironmentVariableOrDefault("https_proxy", "").empty() ||
!GetEnvironmentVariableOrDefault("HTTP_PROXY", "").empty() ||
!GetEnvironmentVariableOrDefault("HTTPS_PROXY", "").empty() ||
!GetEnvironmentVariableOrDefault("S3_ALLOW_SYSTEM_PROXY").empty();

Check failure on line 783 in src/s3plugin.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-latest-hosted-ninja-vcpkg_submod-autocache

too few arguments to function ‘Aws::String GetEnvironmentVariableOrDefault(const String&, const String&)’

Check failure on line 783 in src/s3plugin.cpp

View workflow job for this annotation

GitHub Actions / macos-13-hosted-ninja-vcpkg_submod-autocache

no matching function for call to 'GetEnvironmentVariableOrDefault'

Check failure on line 783 in src/s3plugin.cpp

View workflow job for this annotation

GitHub Actions / macos-14-hosted-ninja-vcpkg_submod-autocache

no matching function for call to 'GetEnvironmentVariableOrDefault'
clientConfig.verifySSL = true;
clientConfig.version = Aws::Http::Version::HTTP_VERSION_2TLS;
if (s3endpoint != "")
Expand Down Expand Up @@ -1226,7 +1229,7 @@ UploadOutcome InitiateAppend(Writer& writer, size_t source_bytes_to_copy)
while (source_bytes_to_copy > Writer::buff_min_)
{
const int64_t copy_count =
source_bytes_to_copy > Writer::buff_max_ ? Writer::buff_max_ : static_cast<int64_t>(source_bytes_to_copy);
static_cast<int64_t>(source_bytes_to_copy > Writer::buff_max_ ? Writer::buff_max_ : source_bytes_to_copy);

// peculiarity of AWS: the range for the copy request has an inclusive end,
// meaning that the bytes numbered start_range to end_range included are copied
Expand Down

0 comments on commit d3268a2

Please sign in to comment.