From a3d6b6f3132ff27207fe0e8753a50c4bbfd78556 Mon Sep 17 00:00:00 2001 From: Ben RUBSON Date: Thu, 2 Nov 2017 08:06:51 +0100 Subject: [PATCH] Correct unnecessary-value-param clang warnings --- encfs/base64.cpp | 2 +- encfs/base64.h | 2 +- encfs/encfs.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/encfs/base64.cpp b/encfs/base64.cpp index 37b6d6c..c14ea95 100644 --- a/encfs/base64.cpp +++ b/encfs/base64.cpp @@ -252,7 +252,7 @@ bool B64StandardDecode(unsigned char *out, const unsigned char *in, int inLen) { // If you want to use an alternate alphabet, change the characters here const static char encodeLookup[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -std::string B64StandardEncode(std::vector inputBuffer) { +std::string B64StandardEncode(const std::vector &inputBuffer) { std::string encodedString; encodedString.reserve(B256ToB64Bytes(inputBuffer.size())); long temp; diff --git a/encfs/base64.h b/encfs/base64.h index 796cfd6..4ec5f2d 100644 --- a/encfs/base64.h +++ b/encfs/base64.h @@ -73,7 +73,7 @@ void AsciiToB32(unsigned char *out, const unsigned char *in, int length); bool B64StandardDecode(unsigned char *out, const unsigned char *in, int inputLen); -std::string B64StandardEncode(std::vector input); +std::string B64StandardEncode(const std::vector &input); } // namespace encfs diff --git a/encfs/encfs.cpp b/encfs/encfs.cpp index 16c3ae6..77d81b9 100644 --- a/encfs/encfs.cpp +++ b/encfs/encfs.cpp @@ -135,7 +135,7 @@ static void checkCanary(const std::shared_ptr &fnode) { // helper function -- apply a functor to a node static int withFileNode(const char *opName, const char *path, struct fuse_file_info *fi, - function op) { + const function &op) { EncFS_Context *ctx = context(); int res = -EIO;