diff --git a/CallRPC.cpp b/CallRPC.cpp index 9d6fdfd49f..c2de5fd21d 100644 --- a/CallRPC.cpp +++ b/CallRPC.cpp @@ -2,10 +2,12 @@ #include #include + #include #include #include #include + #include #include @@ -28,7 +30,7 @@ inline bool isSwitchChar(char c) #endif } -std::string EncodeBase64(std::string s) +std::string EncodeBase64(const std::string& s) { // FIXME: This performs terribly BIO *b64, *bmem; BUF_MEM *bptr; @@ -38,7 +40,7 @@ std::string EncodeBase64(std::string s) bmem = BIO_new(BIO_s_mem()); b64 = BIO_push(b64, bmem); BIO_write(b64, s.c_str(), s.size()); - BIO_flush(b64); + (void) BIO_flush(b64); BIO_get_mem_ptr(b64, &bptr); std::string result(bptr->data, bptr->length); diff --git a/CallRPC.h b/CallRPC.h index fa30b28deb..39cf76a6df 100644 --- a/CallRPC.h +++ b/CallRPC.h @@ -1,4 +1,7 @@ + +#include + #include "json/value.h" extern int commandLineRPC(int argc, char *argv[]); -extern Json::Value callRPC(const std::string& strMethod, const Json::Value& params); \ No newline at end of file +extern Json::Value callRPC(const std::string& strMethod, const Json::Value& params);