Fix Clang/GCC compilation warnings.

This makes it easier to adopt snappy in other projects.

PiperOrigin-RevId: 309958249
This commit is contained in:
Victor Costan
2020-05-05 16:13:04 +00:00
parent 113cd97ab3
commit c98344f626
6 changed files with 141 additions and 53 deletions

View File

@@ -118,7 +118,7 @@ namespace file {
};
DummyStatus GetContents(
const std::string& filename, std::string* data, int unused) {
const std::string& filename, std::string* data, int /*unused*/) {
FILE* fp = std::fopen(filename.c_str(), "rb");
if (fp == NULL) {
std::perror(filename.c_str());
@@ -142,7 +142,7 @@ namespace file {
}
inline DummyStatus SetContents(
const std::string& filename, const std::string& str, int unused) {
const std::string& filename, const std::string& str, int /*unused*/) {
FILE* fp = std::fopen(filename.c_str(), "wb");
if (fp == NULL) {
std::perror(filename.c_str());