From dc5775bb4dd922592c30a377b55665213948765c Mon Sep 17 00:00:00 2001 From: Yahya Lmallas Date: Sat, 30 Jan 2016 11:48:44 +0100 Subject: [PATCH] Fix: Warnings on qiradb trace file and ida build script shouldn't be hardcoded, use something similar to export IDA_SDK=~/idasdk68 && export IDA_DIR=~/ida-6.8 --- ida/build.sh | 4 ++-- qiradb/qiradb/Trace.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ida/build.sh b/ida/build.sh index 63a88a20..fa9b80c7 100755 --- a/ida/build.sh +++ b/ida/build.sh @@ -1,9 +1,9 @@ #!/bin/bash -e -SDKROOT=~/idasdk66 +SDKROOT=$IDA_SDK unamestr=$(uname) if [[ "$unamestr" == 'Linux' ]]; then - IDAROOT=~/ida-6.8 + IDAROOT=$IDA_DIR OUTPUT="qira.plx" OUTPUT64="qira.plx64" ln -sf libs/linux_libwebsockets.a libwebsockets.a diff --git a/qiradb/qiradb/Trace.cpp b/qiradb/qiradb/Trace.cpp index aae8aef2..2580b8b8 100644 --- a/qiradb/qiradb/Trace.cpp +++ b/qiradb/qiradb/Trace.cpp @@ -1,5 +1,6 @@ #include #include +#include #ifndef _WIN32 #include @@ -91,7 +92,7 @@ bool Trace::remap_backing(uint64_t new_size) { while (1) { DWORD fs = GetFileSize(fd_, NULL); if (fs < new_size) { - printf("WARNING: requested %llx bytes, but only %llx are in the file...waiting\n", new_size, fs); + printf("WARNING: requested %" PRIu64 " bytes, but only %llx are in the file...waiting\n", new_size, fs); usleep(100 * 1000); } else { break; @@ -106,7 +107,7 @@ bool Trace::remap_backing(uint64_t new_size) { while (1) { off_t fs = lseek(fd_, 0, SEEK_END); if (fs < new_size) { - printf("WARNING: requested %llx bytes, but only %llx are in the file...waiting\n", new_size, fs); + printf("WARNING: requested %" PRIu64 " bytes, but only %" PRIx64 " are in the file...waiting\n", new_size, fs); usleep(100 * 1000); } else { break;