Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1199: Clean up 4.0 compiler warnings
bccbec4 [Build] Clean up warnings (Cave Spectre) Pull request description: ### Problem Compiler warnings when building off the v4.0 tag ### Root Cause Several different issues: ``` init.cpp: In function ‘bool AppInit2()’: init.cpp:1442:13: warning: unused variable ‘nStart’ [-Wunused-variable] int64_t nStart = GetTimeMillis(); ^~~~~~ ``` ``` wallet/wallet.cpp: In member function ‘CAmount CWallet::GetCredit(const CTransaction&, const isminefilter&, bool) const’: wallet/wallet.cpp:5649:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < tx.vout.size(); i++) { ~~^~~~~~~~~~~~~~~~ ``` ``` leveldb/util/logging.cc: In function ‘bool leveldb::ConsumeDecimalNumber(leveldb::Slice*, uint64_t*)’: leveldb/util/logging.cc:58:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (v == kMaxUint64/10 && delta > kMaxUint64%10)) { ~~~~~~^~~~~~~~~~~~~~~ ``` ``` qt/transactionrecord.cpp: In static member function ‘static QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet*, const CWalletTx&)’: qt/transactionrecord.cpp:221:57: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] if (fAllFromMeDenom && fAllToMeDenom && nFromMe * nToMe) { ~~~~~~~~^~~~~~~ ``` ``` In file included from qt/pivx/welcomecontentwidget.cpp:5:0: ./qt/pivx/welcomecontentwidget.h: In constructor ‘WelcomeContentWidget::WelcomeContentWidget (QWidget*)’: ./qt/pivx/welcomecontentwidget.h:44:18: warning: ‘WelcomeContentWidget::backButton’ will be initialized after -Wreorder] QPushButton *backButton; ^~~~~~~~~~ ./qt/pivx/welcomecontentwidget.h:40:18: warning: ‘QPushButton* WelcomeContentWidget::icConfirm1’ [-Wreorder] QPushButton *icConfirm1; ^~~~~~~~~~ qt/pivx/welcomecontentwidget.cpp:15:1: warning: when initialized here [-Wreorder] WelcomeContentWidget::WelcomeContentWidget(QWidget *parent) : ^~~~~~~~~~~~~~~~~~~~ ``` ### Additional One other I didn't touch. ``` qt/pivx/walletpassworddialog.cpp: In constructor ‘WalletPasswordDialog::WalletPasswordDialog(QWidget*)’: qt/pivx/walletpassworddialog.cpp:85:9: warning: unused variable ‘posXX’ [-Wunused-variable] int posXX = ui->lineEditPassword->width() - 30; ^~~~~ ``` Since I wasn't sure where exactly that dialog pops up to see if the posXX is actually needed and should have a `btnWatch->move()`; so i figured I would leave that to @furszy to take care of. ACKs for top commit: random-zebra: utACK bccbec4 Warrows: ACK bccbec4 Tree-SHA512: 02f783d5e5e5ad5327f5e38afbfc88e1acf22511713738144cb137bedbf1b78cc100754796f1a9f42386d116679cedca01e744f43249526691d64bb630e259f0
- Loading branch information