Skip to content

Commit 29e2525

Browse files
committed
compilation warnings fixed
1 parent ff90868 commit 29e2525

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

contrib/epee/include/gzip_encoding.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define _GZIP_ENCODING_H_
3232
#include "net/http_client_base.h"
3333
#include "zlib/zlib.h"
34-
//#include "http.h"
34+
#include <boost/core/ignore_unused.hpp>
3535

3636

3737
namespace epee
@@ -57,6 +57,7 @@ namespace net_utils
5757
memset(&m_zstream_in, 0, sizeof(m_zstream_in));
5858
memset(&m_zstream_out, 0, sizeof(m_zstream_out));
5959
int ret = 0;
60+
boost::ignore_unused(ret);
6061
if(is_deflate_mode)
6162
{
6263
ret = inflateInit(&m_zstream_in);

contrib/epee/include/os_defenitions.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@
3131

3232

3333
// Check windows
34-
#if _WIN32 || _WIN64
35-
#if _WIN64
34+
#if defined(_WIN32) || defined(_WIN64)
35+
#if defined(_WIN64)
3636
#define ENV64BIT
3737
#else
3838
#define ENV32BIT
3939
#endif
4040
#endif
4141

4242
// Check GCC
43-
#if __GNUC__
44-
#if __x86_64__ || __ppc64__
43+
#if defined(__GNUC__)
44+
#if defined(__x86_64__) || defined(__ppc64__)
4545
#define ENV64BIT
4646
#else
4747
#define ENV32BIT

src/simplewallet/simplewallet.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,6 @@ bool simple_wallet::transfer_impl(const std::vector<std::string> &args, uint64_t
962962
//----------------------------------------------------------------------------------------------------
963963
bool simple_wallet::transfer(const std::vector<std::string> &args_)
964964
{
965-
bool r = false;
966965
if (!try_connect_to_daemon())
967966
return true;
968967

@@ -1544,7 +1543,7 @@ bool simple_wallet::sweep_below(const std::vector<std::string> &args)
15441543
{
15451544
fail_msg_writer() << "address " << args[1] << " has integrated payment id " << epee::string_tools::buff_to_hex_nodelimer(integrated_payment_id) <<
15461545
" which is incompatible with payment id " << epee::string_tools::buff_to_hex_nodelimer(payment_id) << " that was already assigned to this transfer";
1547-
true;
1546+
return true;
15481547
}
15491548

15501549
payment_id = integrated_payment_id; // remember integrated payment id as the main payment id

src/wallet/wallet2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ void wallet2::finalize_transaction(const currency::create_tx_arg& create_tx_para
11061106
THROW_IF_FALSE_WALLET_INT_ERR_EX(p.first < tx.vout.size(), "outs_key_images has invalid out index: " << p.first << ", tx.vout.size() = " << tx.vout.size());
11071107
auto& out = tx.vout[p.first];
11081108
THROW_IF_FALSE_WALLET_INT_ERR_EX(out.target.type() == typeid(txout_to_key), "outs_key_images has invalid out type, index: " << p.first);
1109-
const txout_to_key& otk = boost::get<const txout_to_key&>(out.target);
1109+
const txout_to_key& otk = boost::get<txout_to_key>(out.target);
11101110

11111111
auto it = m_pending_key_images.find(otk.key);
11121112
if (it != m_pending_key_images.end())

0 commit comments

Comments
 (0)