Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct unnecessary-value-param clang warnings #433

Merged
merged 3 commits into from Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion encfs/base64.cpp
Expand Up @@ -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<unsigned char> inputBuffer) {
std::string B64StandardEncode(std::vector<unsigned char> &inputBuffer) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't inputBuffer be const?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Just committed 馃憤

std::string encodedString;
encodedString.reserve(B256ToB64Bytes(inputBuffer.size()));
long temp;
Expand Down
2 changes: 1 addition & 1 deletion encfs/base64.h
Expand Up @@ -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<unsigned char> input);
std::string B64StandardEncode(std::vector<unsigned char> &input);

} // namespace encfs

Expand Down
2 changes: 1 addition & 1 deletion encfs/encfs.cpp
Expand Up @@ -135,7 +135,7 @@ static void checkCanary(const std::shared_ptr<FileNode> &fnode) {
// helper function -- apply a functor to a node
static int withFileNode(const char *opName, const char *path,
struct fuse_file_info *fi,
function<int(FileNode *)> op) {
const function<int(FileNode *)> &op) {
EncFS_Context *ctx = context();

int res = -EIO;
Expand Down