Skip to content

Commit

Permalink
Fixed error reports of failure in cppcheck 2.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ggtakec authored and gaul committed May 27, 2024
1 parent 5c1932f commit 2c532e8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ cppcheck:
--suppress=unmatchedSuppression \
--suppress=useStlAlgorithm \
--suppress=checkLevelNormal \
--suppress=normalCheckLevelMaxBranches \
src/ test/

#
Expand Down
10 changes: 5 additions & 5 deletions src/curl.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ class S3fsCurl

// methods(variables)
CURL* GetCurlHandle() const { return hCurl; }
std::string GetPath() const { return path; }
std::string GetBasePath() const { return base_path; }
std::string GetSpecialSavedPath() const { return saved_path; }
std::string GetUrl() const { return url; }
std::string GetOp() const { return op; }
const std::string& GetPath() const { return path; }
const std::string& GetBasePath() const { return base_path; }
const std::string& GetSpecialSavedPath() const { return saved_path; }
const std::string& GetUrl() const { return url; }
const std::string& GetOp() const { return op; }
const headers_t* GetResponseHeaders() const { return &responseHeaders; }
const std::string* GetBodyData() const { return &bodydata; }
const std::string* GetHeadData() const { return &headdata; }
Expand Down
2 changes: 1 addition & 1 deletion src/test_curl_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void test_slist_remove()
curl_slist_free_all(list);
}

int main(int argc, char *argv[])
int main(int argc, const char *argv[])
{
test_sort_insert();
test_slist_remove();
Expand Down
2 changes: 1 addition & 1 deletion src/test_page_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void test_compress()
ASSERT_EQUALS(off_t(36), size);
}

int main(int argc, char *argv[])
int main(int argc, const char *argv[])
{
test_compress();
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/test_string_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void test_cr_encoding()
ASSERT_EQUALS(get_decoded_cr_code(get_encoded_cr_code(base_mid_crper2.c_str()).c_str()), base_mid_crper2);
}

int main(int argc, char *argv[])
int main(int argc, const char *argv[])
{
S3fsLog singletonLog;

Expand Down
2 changes: 1 addition & 1 deletion test/truncate_read_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// This program truncates the file and reads the file in another process
// between truncate and flush(close file).
//
int main(int argc, char *argv[])
int main(int argc, const char *argv[])
{
if(argc != 3){
fprintf(stderr, "[ERROR] Wrong paraemters\n");
Expand Down

0 comments on commit 2c532e8

Please sign in to comment.