Skip to content

Commit bf63795

Browse files
committed
Fix several LogPrint related variadic warnings from linter
1 parent 0863ea3 commit bf63795

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

src/main.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -3263,21 +3263,26 @@ void PrintBlockTree() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
32633263
// print split or gap
32643264
if (nCol > nPrevCol)
32653265
{
3266-
for (int i = 0; i < nCol-1; i++)
3266+
for (int i = 0; i < nCol-1; i++) {
32673267
LogPrintf("| ");
3268+
}
3269+
32683270
LogPrintf("|\\");
32693271
}
32703272
else if (nCol < nPrevCol)
32713273
{
3272-
for (int i = 0; i < nCol; i++)
3274+
for (int i = 0; i < nCol; i++) {
32733275
LogPrintf("| ");
3276+
}
3277+
32743278
LogPrintf("|");
32753279
}
32763280
nPrevCol = nCol;
32773281

32783282
// print columns
3279-
for (int i = 0; i < nCol; i++)
3283+
for (int i = 0; i < nCol; i++) {
32803284
LogPrintf("| ");
3285+
}
32813286

32823287
// print item
32833288
CBlock block;

src/miner.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,8 @@ void SplitCoinStakeOutput(CBlock &blocknew, int64_t &nReward, bool &fEnableStake
934934

935935
if (dSumAllocation + iterSideStake->second > 1.0)
936936
{
937-
LogPrintf("WARN: SplitCoinStakeOutput: allocation percentage over 100\%, ending sidestake allocations.");
937+
LogPrintf("WARN: SplitCoinStakeOutput: allocation percentage over 100 percent, "
938+
"ending sidestake allocations.");
938939
break;
939940
}
940941

@@ -1327,7 +1328,7 @@ SideStakeAlloc GetSideStakingStatusAndAlloc()
13271328
dSumAllocation += dAllocation;
13281329
if (dSumAllocation > 1.0)
13291330
{
1330-
LogPrintf("WARN: %s: allocation percentage over 100\%, ending sidestake allocations.", __func__);
1331+
LogPrintf("WARN: %s: allocation percentage over 100 percent, ending sidestake allocations.", __func__);
13311332
break;
13321333
}
13331334

src/util/time.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ int64_t MilliTimer::GetStartTime(const std::string& label)
261261
internal_timer = timer_map.at(label);
262262
}
263263
catch (std::out_of_range&) {
264-
LogPrintf("WARNING: %s: Timer with specified label does not exist. Returning zero start time.");
264+
LogPrintf("WARNING: %s: Timer with specified label does not exist. Returning zero start time.", __func__);
265265
}
266266

267267
return internal_timer.start_time;
@@ -291,7 +291,7 @@ const MilliTimer::timer MilliTimer::GetTimes(const std::string& log_string, cons
291291
}
292292
catch (std::out_of_range&)
293293
{
294-
LogPrintf("WARNING: %s: Timer with specified label does not exist. Returning zeroed timer.");
294+
LogPrintf("WARNING: %s: Timer with specified label does not exist. Returning zeroed timer.", __func__);
295295
timer = {};
296296
return timer;
297297
}
@@ -300,8 +300,8 @@ const MilliTimer::timer MilliTimer::GetTimes(const std::string& log_string, cons
300300
// minimize lock time.
301301
if (internal_timer.log)
302302
{
303-
LogPrintf("timer %s: %s: elapsed time: %" PRId64 " ms, time since last check: %" PRId64 " ms.",
304-
label, log_string, timer.elapsed_time, timer.time_since_last_check);
303+
LogPrintf("INFO: %s: timer %s: %s: elapsed time: %" PRId64 " ms, time since last check: %" PRId64 " ms.",
304+
__func__, label, log_string, timer.elapsed_time, timer.time_since_last_check);
305305
}
306306

307307
return timer;

0 commit comments

Comments
 (0)