Merge pull request #1239

12d8616 perf_timer: format string fix for 32 bits (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2016-10-23 19:05:44 +02:00
commit 31ceb830e5
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -68,7 +68,7 @@ public:
performance_timers->pop_back(); performance_timers->pop_back();
ticks = epee::misc_utils::get_tick_count() - ticks; ticks = epee::misc_utils::get_tick_count() - ticks;
char s[12]; char s[12];
snprintf(s, sizeof(s), "%8lu ", ticks); snprintf(s, sizeof(s), "%8llu ", (unsigned long long)ticks);
LOG_PRINT("PERF " << s << std::string(performance_timers->size() * 2, ' ') << " " << name, level); LOG_PRINT("PERF " << s << std::string(performance_timers->size() * 2, ' ') << " " << name, level);
if (performance_timers->empty()) if (performance_timers->empty())
{ {