[insight-vmi] r2009 committed - Fix Warnings

0 views
Skip to first unread message

insig...@googlecode.com

unread,
Jan 2, 2014, 7:57:46 PM1/2/14
to insight-v...@googlegroups.com
Revision: 2009
Author: kit...@gmail.com
Date: Fri Jan 3 00:57:32 2014 UTC
Log: Fix Warnings
http://code.google.com/p/insight-vmi/source/detail?r=2009

Modified:
/trunk/libcparser/include/asttypeevaluator.h
/trunk/libinsight/detect.cpp
/trunk/libinsight/include/insight/detect.h
/trunk/libinsight/kernelsymbolsclass.cpp
/trunk/libinsight/memorymapbuildercs.cpp
/trunk/libinsight/structured.cpp

=======================================
--- /trunk/libcparser/include/asttypeevaluator.h Thu Nov 8 18:49:36 2012
UTC
+++ /trunk/libcparser/include/asttypeevaluator.h Fri Jan 3 00:57:32 2014
UTC
@@ -140,7 +140,7 @@
struct PointsToEvalState
{
PointsToEvalState(ASTTypeEvaluator* typeEval)
- : sym(0), transformations(typeEval), srcNode(0), root(root),
+ : sym(0), transformations(typeEval), srcNode(0), root(0),
prevNode(0), lastLinkTrans(typeEval), validLvalue(true)
{}

=======================================
--- /trunk/libinsight/detect.cpp Fri Nov 8 11:00:32 2013 UTC
+++ /trunk/libinsight/detect.cpp Fri Jan 3 00:57:32 2014 UTC
@@ -57,6 +57,8 @@
Detect::~Detect(){
delete Functions;
}
+
+QString Detect::FunctionInfo::no_function = QString("");

#define GENERIC_NOP1 0x90

@@ -2040,7 +2042,7 @@
// }

//check for uninitialized content after initialized part
of kernels text segment
- if(moduleName.compare(QString("kernel")) == 0 &&
sectionNumber == (quint64) context.textSegmentData.size() - 1 && i >=
(context.textSegmentInitialized % KERNEL_CODEPAGE_SIZE))
+ if(moduleName.compare(QString("kernel")) == 0 &&
sectionNumber == (quint64) context.textSegmentData.size() - 1 && i >=
(qint32) (context.textSegmentInitialized % KERNEL_CODEPAGE_SIZE))
{
quint64 unkCodeAddress =
_sym.memSpecs().systemMap.value("_text").address + sectionNumber *
KERNEL_CODEPAGE_SIZE + i;
int pageSize = 0;
@@ -2893,7 +2895,7 @@
data.resize(ptEntries.nextPageOffset(vmem->memSpecs()));

// Get data
- if ((quint64)vmem->readAtomic(i, data.data(), data.size()) !=
data.size()) {
+ if ((quint64)vmem->readAtomic(i, data.data(), data.size()) !=
(quint64) data.size()) {
std::cout << "ERROR: Could not read data of page!" <<
std::endl;
return;
}
=======================================
--- /trunk/libinsight/include/insight/detect.h Fri Nov 8 10:30:40 2013 UTC
+++ /trunk/libinsight/include/insight/detect.h Fri Jan 3 00:57:32 2014 UTC
@@ -74,15 +74,17 @@

struct FunctionInfo
{
- FunctionInfo() : source(UNKOWN), memory_function(0),
system_function("") {}
+ FunctionInfo() : source(UNKOWN), memory_function(0),
system_function(FunctionInfo::no_function) {}
FunctionInfo(FunctionSource source, const Function *f) :
- source(source), memory_function(f), system_function("") {}
+ source(source), memory_function(f),
system_function(FunctionInfo::no_function) {}
FunctionInfo(FunctionSource source, const QString &functionName) :
source(source), memory_function(0),
system_function(functionName) {}

FunctionSource source;
const Function *memory_function;
const QString &system_function;
+
+ static QString no_function;
};

Detect(KernelSymbols &sym);
=======================================
--- /trunk/libinsight/kernelsymbolsclass.cpp Mon Feb 4 13:10:16 2013 UTC
+++ /trunk/libinsight/kernelsymbolsclass.cpp Fri Jan 3 00:57:32 2014 UTC
@@ -34,7 +34,8 @@
Instance (getInst)(const T*, VirtualMemory*))
{
typedef QList<T*> ListT;
- typedef QMultiHash<QString, T*> HashT;
+ //Currently unused -check if needed
+ //typedef QMultiHash<QString, T*> HashT;

int count = 0;
bool applyFilter = !filter.isEmpty();
=======================================
--- /trunk/libinsight/memorymapbuildercs.cpp Wed Jul 10 11:14:19 2013 UTC
+++ /trunk/libinsight/memorymapbuildercs.cpp Fri Jan 3 00:57:32 2014 UTC
@@ -150,6 +150,8 @@
MemoryMapNode *node,
VariableTypeContainerList
*path)
{
+ // TODO inst is unused -check if it can be removed
+ Q_UNUSED(inst);
assert(node);

_map->_shared->functionPointersLock.lock();
=======================================
--- /trunk/libinsight/structured.cpp Fri Feb 15 12:33:15 2013 UTC
+++ /trunk/libinsight/structured.cpp Fri Jan 3 00:57:32 2014 UTC
@@ -89,7 +89,7 @@
// To place the member hashes at different bit positions
uint rot = 0;

- for (int i = memberIndex; i < (memberIndex + nrMembers) && valid; ++i)
+ for (quint32 i = memberIndex; i < (memberIndex + nrMembers) && valid;
++i)
{
const StructuredMember* member = _members[i];
hash ^= rotl32(member->refType()->hash(&valid), rot);
Reply all
Reply to author
Forward
0 new messages