Mercurial > hg > bitcoin
changeset 2889:4d83e4d345c7 draft
fix warnings: unused variable 'XX' [-Wunused-variable]
author | Wladimir J. van der Laan <laanwj@gmail.com> |
---|---|
date | Sun, 15 Apr 2012 12:53:14 +0200 |
parents | b8c22f6b3094 |
children | f08ae998dfd0 |
files | scripts/qt/extract_strings_qt.py src/net.cpp src/qt/bitcoinstrings.cpp src/script.cpp |
diffstat | 4 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/qt/extract_strings_qt.py +++ b/scripts/qt/extract_strings_qt.py @@ -53,9 +53,15 @@ messages = parse_po(out) f = open(OUT_CPP, 'w') -f.write('#include <QtGlobal>\n') -f.write('// Automatically generated by extract_strings.py\n') -f.write('static const char *bitcoin_strings[] = {') +f.write("""#include <QtGlobal> +// Automatically generated by extract_strings.py +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +""") +f.write('static const char UNUSED *bitcoin_strings[] = {') for (msgid, msgstr) in messages: if msgid != EMPTY: f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid)))
--- a/src/net.cpp +++ b/src/net.cpp @@ -1305,8 +1305,6 @@ return; } - bool fAddSeeds = false; - // Add seed nodes if IRC isn't working bool fTOR = (fUseProxy && addrProxy.GetPort() == 9050); if (addrman.size()==0 && (GetTime() - nStart > 60 || fTOR) && !fTestNet) @@ -1332,7 +1330,6 @@ // Choose an address to connect to based on most recently seen // CAddress addrConnect; - int64 nBest = std::numeric_limits<int64>::min(); // Only connect to one address per a.b.?.? range. // Do this here so we don't have to critsect vNodes inside mapAddresses critsect.
--- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -1,6 +1,11 @@ #include <QtGlobal> // Automatically generated by extract_strings.py -static const char *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "Bitcoin version"), +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +static const char UNUSED *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "Bitcoin version"), QT_TRANSLATE_NOOP("bitcoin-core", "Usage:"), QT_TRANSLATE_NOOP("bitcoin-core", "Send command to -server or bitcoind"), QT_TRANSLATE_NOOP("bitcoin-core", "List commands"),