Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

variable 'worstStart' set but not used [-Wunused-but-set-variable] #193

Open
andreicristianpetcu opened this issue Mar 19, 2015 · 1 comment

Comments

@andreicristianpetcu
Copy link

Hi,
I tried to build stellard but I got this error

$scons
scons: Reading SConscript files ...

Configuration:
        CC gcc
       CXX g++
  CXXFLAGS -O3 -fno-strict-aliasing -pthread -Wno-invalid-offsetof -Wformat
           -Wno-unused-local-typedefs -g -DDEBUG -D_DEBUG -frtti -std=c++11
 LINKFLAGS -pthread -rdynamic -pthread
      LIBS ssl crypto dl protobuf pthread z /usr/local/lib/libsodium.a
           boost_date_time boost_filesystem boost_program_options boost_regex
           boost_system boost_thread dl rt

Building:

scons: done reading SConscript files.
scons: Building targets ...
    src/ripple/proto/ripple.proto
    src/ripple/proto/ripple.pb.cc
    src/ripple/beast/ripple_beast.cpp
In file included from src/leveldb/../beast/beast/container/tests/hash_append.test.cpp:26:0,
                 from src/leveldb/../beast/beast/container/Container.cpp:29,
                 from src/ripple/beast/ripple_beast.cpp:36:
src/leveldb/../beast/beast/container/tests/hash_metrics.h: In instantiation of 'double beast::hash_metrics::windowed_score(FwdIter, FwdIter) [with FwdIter = __gnu_cxx::__normal_iterator<const long unsigned int*, s
td::vector<long unsigned int> >]':
src/leveldb/../beast/beast/container/tests/hash_append.test.cpp:421:45:   required from 'void beast::hash_append_test::measure_hashes(beast::hash_append_test::results_t&, const Hashes&) [with Hasher = beast::hash_
append_tests::jenkins1; Hashes = std::vector<long unsigned int>]'
src/leveldb/../beast/beast/container/tests/hash_append.test.cpp:436:49:   required from 'void beast::hash_append_test::measure_keys(beast::hash_append_test::results_t&, const Keys&) [with Hasher = beast::hash_appe
nd_tests::jenkins1; Keys = std::set<beast::hash_append_tests::SlowKey, std::less<beast::hash_append_tests::SlowKey>, std::allocator<beast::hash_append_tests::SlowKey> >]'
src/leveldb/../beast/beast/container/tests/hash_append.test.cpp:445:45:   required from 'void beast::hash_append_test::test_hasher(const string&, std::size_t) [with Hasher = beast::hash_append_tests::jenkins1; Key
 = beast::hash_append_tests::SlowKey; std::string = std::basic_string<char>; std::size_t = long unsigned int]'
src/leveldb/../beast/beast/container/tests/hash_append.test.cpp:477:96:   required from here
src/leveldb/../beast/beast/container/tests/hash_metrics.h:172:9: warning: variable 'worstStart' set but not used [-Wunused-but-set-variable]
     int worstStart = -1;
         ^
src/leveldb/../beast/beast/container/tests/hash_metrics.h:173:9: warning: variable 'worstWidth' set but not used [-Wunused-but-set-variable]
     int worstWidth = -1;
         ^
In file included from src/leveldb/../beast/modules/beast_core/beast_core.cpp:194:0,
                 from src/ripple/beast/ripple_beast.cpp:29:
src/leveldb/../beast/modules/beast_core/native/linux_Threads.cpp: In function 'void beast::swapUserAndEffectiveUser()':
src/leveldb/../beast/modules/beast_core/native/linux_Threads.cpp:85:42: warning: ignoring return value of 'int setreuid(__uid_t, __uid_t)', declared with attribute warn_unused_result [-Wunused-result]
     (void) setreuid (geteuid(), getuid());
                                          ^
src/leveldb/../beast/modules/beast_core/native/linux_Threads.cpp:86:42: warning: ignoring return value of 'int setregid(__gid_t, __gid_t)', declared with attribute warn_unused_result [-Wunused-result]
     (void) setregid (getegid(), getgid());

    src/ripple/beast/ripple_beastc.c
    src/ripple_data/crypto/EdKeyPair.cpp
    src/ripple_data/crypto/StellarPrivateKey.cpp
    src/ripple_data/crypto/StellarPublicKey.cpp
    src/ripple_app/data/Database.cpp
    src/ripple_overlay/impl/PeerImp.cpp
In file included from src/ripple_app/ledger/Ledger.h:33:0,
                 from src/ripple_app/ledger/LedgerMaster.h:25,
                 from src/ripple_overlay/impl/PeerImp.cpp:11:
src/ripple_app/tx/TransactionMeta.h: In member function 'bool ripple::TransactionMetaSet::hasDeliveredAmount() const':
src/ripple_app/tx/TransactionMeta.h:114:17: error: cannot convert 'const boost::optional<ripple::STAmount>' to 'bool' in return
          return mDelivered;
                 ^
scons: *** [build/obj/src/ripple_overlay/impl/PeerImp.o] Error 1
scons: building terminated because of errors.

Any clue what I'm doing wrong? :P Thank you!

@ioutrade
Copy link

This problem replicated with boost version 1.57. Roll back to version 1.55, manually download it on boost.org from Old Boost Releases or from the Sourceforge download page.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants