Skip to content

Commit 9580065

Browse files
committed
[OnGoing]
1. Fixed warnings in Linux / GCC. 2. Fixed warnings in Linux / Clang.
1 parent fe889ce commit 9580065

File tree

11 files changed

+14
-16
lines changed

11 files changed

+14
-16
lines changed

src/compat/glibcxx_sanity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bool sanity_test_range_fmt()
4747
{
4848
std::string test;
4949
try {
50-
test.at(1);
50+
(void) test.at(1);
5151
} catch (const std::out_of_range&) {
5252
return true;
5353
} catch (...) {

src/libspark/bpplus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ bool BPPlus::verify(const std::vector<std::vector<GroupElement>>& unpadded_C, co
315315
return false;
316316
}
317317
if (!is_nonzero_power_of_2(M)) {
318-
M = 1 << log2(unpadded_M) + 1;
318+
M = 1 << (log2(unpadded_M) + 1);
319319
}
320320

321321
// Track the maximum value

src/rpc/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
151151
obj.push_back(Pair("timeoffset", stats.nTimeOffset));
152152
if (stats.dPingTime > 0.0)
153153
obj.push_back(Pair("pingtime", stats.dPingTime));
154-
if (stats.dMinPing < std::numeric_limits<int64_t>::max()/1e6)
154+
if (stats.dMinPing < static_cast<double>(std::numeric_limits<int64_t>::max())/1e6)
155155
obj.push_back(Pair("minping", stats.dMinPing));
156156
if (stats.dPingWait > 0.0)
157157
obj.push_back(Pair("pingwait", stats.dPingWait));

src/rpc/protocol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static const std::string COOKIEAUTH_FILE = ".cookie";
6969
boost::filesystem::path GetAuthCookieFile()
7070
{
7171
boost::filesystem::path path(GetArg("-rpccookiefile", COOKIEAUTH_FILE));
72-
if (!path.is_complete()) path = GetDataDir() / path;
72+
if (!path.is_absolute()) path = GetDataDir() / path;
7373
return path;
7474
}
7575

src/script/ismine.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey, bool&
148148
return ISMINE_SPENDABLE;
149149
break;
150150
}
151+
case TX_SPARKMINT: {}
152+
case TX_SPARKSMINT: {}
151153
}
152154

153155
if (keystore.HaveWatchOnly(scriptPubKey)) {

src/secp256k1/src/ecmult.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "group.h"
1212
#include "scalar.h"
1313
#include "scratch.h"
14+
#include "scratch_impl.h"
1415

1516
typedef struct {
1617
/* For accelerating the computation of a*P + b*G: */

src/secp256k1/src/ecmult_const_impl.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
#include "ecmult_const.h"
1313
#include "ecmult_impl.h"
1414

15-
#ifdef USE_ENDOMORPHISM
16-
#define WNAF_BITS 128
17-
#else
18-
#define WNAF_BITS 256
19-
#endif
20-
#define WNAF_SIZE(w) ((WNAF_BITS + (w) - 1) / (w))
21-
2215
/* This is like `ECMULT_TABLE_GET_GE` but is constant time */
2316
#define ECMULT_CONST_TABLE_GET_GE(r,pre,n,w) do { \
2417
int m; \

src/secp256k1/src/ecmult_impl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ static int secp256k1_pippenger_bucket_window(size_t n) {
748748
* Returns the maximum optimal number of points for a bucket_window.
749749
*/
750750
static size_t secp256k1_pippenger_bucket_window_inv(int bucket_window) {
751-
int i;
752751
#ifdef USE_ENDOMORPHISM
753752
int size[11]= {1, 4, 20, 57, 136, 235, 1260, 1260, 4420, 7880, 16050};
754753
#else

src/secp256k1/src/scratch_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define _SECP256K1_SCRATCH_IMPL_H_
99

1010
#include "scratch.h"
11+
#include <string.h>
1112

1213
/* Using 16 bytes alignment because common architectures never have alignment
1314
* requirements above 8 for any of the types we care about. In addition we

src/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ void ClearDatadirCache()
612612
boost::filesystem::path GetConfigFile(const std::string& confPath)
613613
{
614614
boost::filesystem::path pathConfigFile(confPath);
615-
if (!pathConfigFile.is_complete()) {
615+
if (!pathConfigFile.is_absolute()) {
616616
boost::filesystem::path dataDir = GetDataDir(false);
617617

618618
// upgrade heuristics: if dataDir ends with either "zcoin" or ".zcoin" and confPath is set
@@ -694,7 +694,7 @@ bool RenameDirectoriesFromZcoinToFiro()
694694
boost::filesystem::path GetPidFile()
695695
{
696696
boost::filesystem::path pathPidFile(GetArg("-pid", BITCOIN_PID_FILENAME));
697-
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
697+
if (!pathPidFile.is_absolute()) pathPidFile = GetDataDir() / pathPidFile;
698698
return pathPidFile;
699699
}
700700

0 commit comments

Comments
 (0)