Skip to content

Commit

Permalink
fix warnings: unused variable 'XX' [-Wunused-variable]
Browse files Browse the repository at this point in the history
  • Loading branch information
laanwj committed Apr 15, 2012
1 parent 76d8170 commit 11cd416
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
12 changes: 9 additions & 3 deletions share/qt/extract_strings_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ def parse_po(text):
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)))
Expand Down
3 changes: 0 additions & 3 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1233,8 +1233,6 @@ void ThreadOpenConnections2(void* parg)
if (fShutdown)
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)
Expand All @@ -1260,7 +1258,6 @@ void ThreadOpenConnections2(void* parg)
// 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.
Expand Down
7 changes: 6 additions & 1 deletion src/qt/bitcoinstrings.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#include <QtGlobal>
// 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 "
"running."),
QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Disk space is low "),
Expand Down
1 change: 0 additions & 1 deletion src/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,6 @@ bool ExtractAddresses(const CScript& scriptPubKey, txnouttype& typeRet, vector<C
if (typeRet == TX_MULTISIG)
{
nRequiredRet = vSolutions.front()[0];
int n = vSolutions.back()[0];
for (int i = 1; i < vSolutions.size()-1; i++)
{
CBitcoinAddress address;
Expand Down

0 comments on commit 11cd416

Please sign in to comment.