Commit c65fea20 authored by Lyude Paul's avatar Lyude Paul

Main.cpp: Fix all warnings

parent c43762b0
......@@ -28,7 +28,6 @@ bool ReadFile(std::vector<uint8_t> *fileData, std::string filename)
fclose(fp);
return true;
err:
if (fp) {
fclose(fp);
}
......@@ -37,7 +36,7 @@ err:
void PrintFile(std::vector<uint8_t> *fileData, size_t offset = 0, size_t realpos = 0)
{
printf("file size is 0x%08llx\n", fileData->size());
printf("file size is 0x%08zx\n", fileData->size());
uint32_t *data = reinterpret_cast<uint32_t*>(fileData->data() + offset);
size_t size = fileData->size() / 4;
for (size_t i = 0; i < size; i++)
......@@ -47,7 +46,7 @@ void PrintFile(std::vector<uint8_t> *fileData, size_t offset = 0, size_t realpos
{
return (uint8_t)(word >> off);
};
printf("%s0x%08x :0x%08x: %c%c%c%c\n",
printf("%s0x%08zx :0x%08x: %c%c%c%c\n",
((realpos - offset) / 4 == i) ? "->" : "",
offset + i * 4,
word,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment