Skip to content

Commit

Permalink
Merge pull request #95 from rtobar/remove-warnings
Browse files Browse the repository at this point in the history
Fix printf and multi-character constant warnings
  • Loading branch information
aras-p committed Sep 12, 2024
2 parents 225fe2b + 888e047 commit e9b55c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/BuildEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "external/simdjson/simdjson.h"
#include "external/xxHash/xxhash.h"
#include <assert.h>
#include <cinttypes>
#include <iterator>
#include <mutex>

Expand Down Expand Up @@ -57,7 +58,7 @@ static void DebugPrintEvents(const BuildEvents& events, const BuildNames& names)
{
const BuildEvent& event = events[EventIndex(int(i))];
const std::string_view namesSubstr = names[event.detailIndex].substr(0, 130);
printf("%4zi: t=%i t1=%7lld t2=%7lld par=%4i ch=%4zi det=%.*s\n", i, (int) event.type, event.ts, event.ts+event.dur, event.parent.idx, event.children.size(), (int)namesSubstr.size(), namesSubstr.data());
printf("%4zi: t=%i t1=%7" PRId64 " t2=%7" PRId64 " par=%4i ch=%4zi det=%.*s\n", i, (int) event.type, event.ts, event.ts+event.dur, event.parent.idx, event.children.size(), (int)namesSubstr.size(), namesSubstr.data());
}
}

Expand Down Expand Up @@ -525,7 +526,7 @@ struct BufferedReader
size_t bufferSize;
};

const uint32_t kFileMagic = 'CBA0';
const uint32_t kFileMagic = 0x43424130; // 'CBA0'

bool SaveBuildEvents(BuildEventsParser* parser, const std::string& fileName)
{
Expand Down

0 comments on commit e9b55c1

Please sign in to comment.