aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-08-24 19:21:02 +0200
committerRiccardo Spagni <ric@spagni.net>2015-08-24 19:21:04 +0200
commit6b7be9f89b17e353beee41015186076a848dab60 (patch)
treeae4d2fd8af816d038951ea33fa441b034d5d3a38 /src
parentMerge pull request #381 (diff)
parentuse correct unsigned type (diff)
downloadmonero-6b7be9f89b17e353beee41015186076a848dab60.tar.xz
Merge pull request #383
3b5330e use correct unsigned type (roman) 59cc92b removed some gcc warnings. mainly unused variables. (roman)
Diffstat (limited to 'src')
-rw-r--r--src/crypto/groestl.c4
-rw-r--r--src/crypto/slow-hash.c1
-rw-r--r--src/cryptonote_core/blockchain.cpp3
-rw-r--r--src/cryptonote_core/cryptonote_format_utils.cpp1
4 files changed, 2 insertions, 7 deletions
diff --git a/src/crypto/groestl.c b/src/crypto/groestl.c
index e1c89cc3b..c8258add3 100644
--- a/src/crypto/groestl.c
+++ b/src/crypto/groestl.c
@@ -8,6 +8,7 @@
*
*/
+#include <stddef.h>
#include "groestl.h"
#include "groestl_tables.h"
@@ -204,10 +205,9 @@ static void OutputTransformation(hashState *ctx) {
/* initialise context */
static void Init(hashState* ctx) {
- int i = 0;
/* allocate memory for state and data buffer */
- for(;i<(SIZE512/sizeof(uint32_t));i++)
+ for(size_t i = 0; i < (SIZE512/sizeof(uint32_t)); i++)
{
ctx->chaining[i] = 0;
}
diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c
index 60699d4e6..679edf7f9 100644
--- a/src/crypto/slow-hash.c
+++ b/src/crypto/slow-hash.c
@@ -413,7 +413,6 @@ BOOL SetLockPagesPrivilege(HANDLE hProcess, BOOL bEnable)
void slow_hash_allocate_state(void)
{
- int state = 0;
if(hp_state != NULL)
return;
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index be0a4a6d7..24b82c520 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2028,7 +2028,6 @@ bool Blockchain::check_tx_inputs(const transaction& tx, uint64_t* pmax_used_bloc
return false;
}
- bool result;
if (threads > 1)
{
// ND: Speedup
@@ -2364,7 +2363,6 @@ bool Blockchain::handle_block_to_main_chain(const block& bl, const crypto::hash&
uint64_t t_exists = 0;
uint64_t t_pool = 0;
uint64_t t_dblspnd = 0;
- uint64_t t_cc;
bool add_tx_to_pool = false;
TIME_MEASURE_FINISH(t3);
@@ -2679,7 +2677,6 @@ bool Blockchain::cleanup_handle_incoming_blocks(bool force_sync)
LOG_PRINT_YELLOW("Blockchain::" << __func__, LOG_LEVEL_3);
CRITICAL_REGION_LOCAL(m_blockchain_lock);
TIME_MEASURE_START(t1);
- auto height = m_db->height();
if (m_sync_counter > 0)
{
diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp
index cac51c042..b679eca50 100644
--- a/src/cryptonote_core/cryptonote_format_utils.cpp
+++ b/src/cryptonote_core/cryptonote_format_utils.cpp
@@ -433,7 +433,6 @@ namespace cryptonote
if (get_encrypted_payment_id_from_tx_extra_nonce(extra_nonce.nonce, payment_id))
{
LOG_PRINT_L2("Encrypting payment id " << payment_id);
- crypto::key_derivation derivation;
crypto::public_key view_key_pub = get_destination_view_key_pub(destinations, sender_account_keys);
if (view_key_pub == null_pkey)
{