Browse Source

fix warnings: unused variable 'XX' [-Wunused-variable]

0.8
Wladimir J. van der Laan 13 years ago
parent
commit
11cd416525
  1. 12
      share/qt/extract_strings_qt.py
  2. 3
      src/net.cpp
  3. 7
      src/qt/bitcoinstrings.cpp
  4. 1
      src/script.cpp

12
share/qt/extract_strings_qt.py

@ -54,9 +54,15 @@ child = Popen(['xgettext','--output=-','-n','--keyword=_'] + files, stdout=PIPE)
messages = parse_po(out) messages = parse_po(out)
f = open(OUT_CPP, 'w') f = open(OUT_CPP, 'w')
f.write('#include <QtGlobal>\n') f.write("""#include <QtGlobal>
f.write('// Automatically generated by extract_strings.py\n') // Automatically generated by extract_strings.py
f.write('static const char *bitcoin_strings[] = {') #ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
""")
f.write('static const char UNUSED *bitcoin_strings[] = {')
for (msgid, msgstr) in messages: for (msgid, msgstr) in messages:
if msgid != EMPTY: if msgid != EMPTY:
f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid))) f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid)))

3
src/net.cpp

@ -1233,8 +1233,6 @@ void ThreadOpenConnections2(void* parg)
if (fShutdown) if (fShutdown)
return; return;
bool fAddSeeds = false;
// Add seed nodes if IRC isn't working // Add seed nodes if IRC isn't working
bool fTOR = (fUseProxy && addrProxy.GetPort() == 9050); bool fTOR = (fUseProxy && addrProxy.GetPort() == 9050);
if (addrman.size()==0 && (GetTime() - nStart > 60 || fTOR) && !fTestNet) if (addrman.size()==0 && (GetTime() - nStart > 60 || fTOR) && !fTestNet)
@ -1260,7 +1258,6 @@ void ThreadOpenConnections2(void* parg)
// Choose an address to connect to based on most recently seen // Choose an address to connect to based on most recently seen
// //
CAddress addrConnect; CAddress addrConnect;
int64 nBest = std::numeric_limits<int64>::min();
// Only connect to one address per a.b.?.? range. // Only connect to one address per a.b.?.? range.
// Do this here so we don't have to critsect vNodes inside mapAddresses critsect. // Do this here so we don't have to critsect vNodes inside mapAddresses critsect.

7
src/qt/bitcoinstrings.cpp

@ -1,6 +1,11 @@
#include <QtGlobal> #include <QtGlobal>
// Automatically generated by extract_strings.py // Automatically generated by extract_strings.py
static const char *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "" #ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", ""
"Unable to bind to port %d on this computer. Bitcoin is probably already " "Unable to bind to port %d on this computer. Bitcoin is probably already "
"running."), "running."),
QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Disk space is low "), QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Disk space is low "),

1
src/script.cpp

@ -1443,7 +1443,6 @@ bool ExtractAddresses(const CScript& scriptPubKey, txnouttype& typeRet, vector<C
if (typeRet == TX_MULTISIG) if (typeRet == TX_MULTISIG)
{ {
nRequiredRet = vSolutions.front()[0]; nRequiredRet = vSolutions.front()[0];
int n = vSolutions.back()[0];
for (int i = 1; i < vSolutions.size()-1; i++) for (int i = 1; i < vSolutions.size()-1; i++)
{ {
CBitcoinAddress address; CBitcoinAddress address;

Loading…
Cancel
Save