Skip to content

Commit

Permalink
Add binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Gouache committed Sep 16, 2024
1 parent b65d53c commit 10a02e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/gcsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ gc::StatusOr<std::string> ReadHeader(const std::string &bucket_name,
return gc::Status{gc::StatusCode::kInternal, "Got an empty header"};
}
printf("Read header '%s' (length = %d)\n", line.c_str(), line.length());

Check warning on line 563 in src/gcsplugin.cpp

View workflow job for this annotation

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

format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wformat=]

Check warning on line 563 in src/gcsplugin.cpp

View workflow job for this annotation

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

format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wformat=]

Check warning on line 563 in src/gcsplugin.cpp

View workflow job for this annotation

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

format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]

Check warning on line 563 in src/gcsplugin.cpp

View workflow job for this annotation

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

format specifies type 'int' but the argument has type 'size_type' (aka 'unsigned long') [-Wformat]
int toto = line.length();

Check warning on line 564 in src/gcsplugin.cpp

View workflow job for this annotation

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

unused variable ‘toto’ [-Wunused-variable]

Check warning on line 564 in src/gcsplugin.cpp

View workflow job for this annotation

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

unused variable ‘toto’ [-Wunused-variable]

Check warning on line 564 in src/gcsplugin.cpp

View workflow job for this annotation

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

unused variable 'toto' [-Wunused-variable]

Check warning on line 564 in src/gcsplugin.cpp

View workflow job for this annotation

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

unused variable 'toto' [-Wunused-variable]
return line;
}

Expand Down
2 changes: 1 addition & 1 deletion test/drivertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ int compareSize(const char *file_name_output, long long int filesize) {

int compareFiles(std::string local_file_path, std::string gcs_uri) {
// Lire le fichier local
std::ifstream local_file(local_file_path);
std::ifstream local_file(local_file_path, std::ios::binary);
if (!local_file) {
std::cerr << "Erreur lors de l'ouverture du fichier local." << std::endl;
return false;
Expand Down

0 comments on commit 10a02e3

Please sign in to comment.