From: Wladimir J. van der Laan Date: Sun, 15 Apr 2012 10:53:14 +0000 (+0200) Subject: fix warnings: unused variable 'XX' [-Wunused-variable] X-Git-Tag: v0.4.0-unstable~129^2~1^2~18^2~18 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=0aa0bb1ead81641480c0c7533a1f52dd6a07434e fix warnings: unused variable 'XX' [-Wunused-variable] --- diff --git a/scripts/qt/extract_strings_qt.py b/scripts/qt/extract_strings_qt.py index 6627de4..b047869 100755 --- a/scripts/qt/extract_strings_qt.py +++ b/scripts/qt/extract_strings_qt.py @@ -53,9 +53,15 @@ child = Popen(['xgettext','--output=-','-n','--keyword=_'] + files, stdout=PIPE) messages = parse_po(out) f = open(OUT_CPP, 'w') -f.write('#include \n') -f.write('// Automatically generated by extract_strings.py\n') -f.write('static const char *bitcoin_strings[] = {') +f.write("""#include +// 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))) diff --git a/src/net.cpp b/src/net.cpp index 37e73c4..9bdb1f2 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1305,8 +1305,6 @@ void ThreadOpenConnections2(void* parg) 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 @@ void ThreadOpenConnections2(void* parg) // Choose an address to connect to based on most recently seen // CAddress addrConnect; - int64 nBest = std::numeric_limits::min(); // Only connect to one address per a.b.?.? range. // Do this here so we don't have to critsect vNodes inside mapAddresses critsect. diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 73db1fe..73a63e9 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -1,6 +1,11 @@ #include // 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"), diff --git a/src/script.cpp b/src/script.cpp index b6f1202..21f101e 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1443,7 +1443,6 @@ bool ExtractAddresses(const CScript& scriptPubKey, txnouttype& typeRet, vector