fix warnings by providing empty virtual destructors for classes that needed them, reordering initialization of member variables, and by giving the type uint to all the 'const nFooTypes;' variables.
git-svn-id: svn://10.0.0.236/trunk@16148 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -246,6 +246,8 @@ public:
|
||||
InsnExternalUse(DataNode* inSrcPrimitive, Pool& inPool, Uint8 inUse) :
|
||||
InsnUseXDefineYFromPool(inSrcPrimitive, inPool, inUse, 0) {}
|
||||
|
||||
virtual ~InsnExternalUse() {}
|
||||
|
||||
virtual InstructionFlags getFlags() const { return (ifExternalInsn); }
|
||||
|
||||
#ifdef DEBUG_LOG
|
||||
@@ -262,6 +264,8 @@ public:
|
||||
InsnExternalDefine(DataNode* inSrcPrimitive, Pool& inPool, Uint8 inDefine) :
|
||||
InsnUseXDefineYFromPool(inSrcPrimitive, inPool, 0, inDefine) {}
|
||||
|
||||
virtual ~InsnExternalDefine() {}
|
||||
|
||||
virtual InstructionFlags getFlags() const { return (ifExternalInsn); }
|
||||
|
||||
#ifdef DEBUG_LOG
|
||||
|
||||
@@ -397,7 +397,7 @@ inline void TranslationBinding::define(const VariableOrConstant &poc, ControlNod
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
const initialPhiSize = 3;
|
||||
const Uint32 initialPhiSize = 3;
|
||||
|
||||
//
|
||||
// Create a new translation binding environment.
|
||||
|
||||
@@ -63,7 +63,7 @@ enum ControlKind // NormalIncoming? NormalOutgoing? OneNormalOutgoing?
|
||||
ckCatch, // no yes yes no yes
|
||||
ckReturn // yes no no no no
|
||||
};
|
||||
const nControlKinds = ckReturn + 1;
|
||||
const uint nControlKinds = ckReturn + 1;
|
||||
|
||||
struct ControlKindProperties
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ enum PrimitiveFormat
|
||||
pfSysCall, // SysCall
|
||||
pfCall // Call
|
||||
};
|
||||
const nPrimitiveFormats = pfCall + 1;
|
||||
const uint nPrimitiveFormats = pfCall + 1;
|
||||
|
||||
enum PrimitiveCategory
|
||||
{
|
||||
@@ -78,7 +78,7 @@ enum PrimitiveCategory
|
||||
pcSysCall, // SysCall
|
||||
pcCall // Call
|
||||
};
|
||||
const nPrimitiveCategories = pcCall + 1;
|
||||
const uint nPrimitiveCategories = pcCall + 1;
|
||||
|
||||
extern const PrimitiveFormat categoryFormats[nPrimitiveCategories];
|
||||
|
||||
@@ -291,6 +291,8 @@ class DataNode
|
||||
public:
|
||||
DataNode(ValueKind kind) : kind(kind), constant(true) {};
|
||||
|
||||
virtual ~DataNode() {};
|
||||
|
||||
// Use these instead of expressions like "getFormat() == pfLd" because the latter doesn't do
|
||||
// type checking -- the compiler will happily let you make errors like "getFormat() == pcLd".
|
||||
inline bool isConstant() const {return constant;}
|
||||
|
||||
@@ -105,7 +105,7 @@ enum ValueKind // Concrete? RegOrMem? #words (as defined by the Java stack
|
||||
vkMemory, // no no yes no N/A // Value representing all of memory in data flow edges
|
||||
vkTuple // no no no no N/A // Value representing a tuple of other values
|
||||
};
|
||||
const nValueKinds = vkTuple + 1;
|
||||
const uint nValueKinds = vkTuple + 1;
|
||||
|
||||
inline ValueKind typeKindToValueKind(TypeKind tk);
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
UT_DEFINE_LOG_MODULE(Debugger);
|
||||
|
||||
DebuggerState::DebuggerState(Pool& p) :
|
||||
pool(p),
|
||||
breakpoints(NULL),
|
||||
enabled(false),
|
||||
breakpoints(NULL)
|
||||
pool(p)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -95,8 +95,8 @@ public:
|
||||
protected:
|
||||
DebuggerServerChannel(PRFileDesc* inSync, PRFileDesc* inAsync) :
|
||||
EventListener(gCompileOrLoadBroadcaster),
|
||||
mAsync(inAsync),
|
||||
mSync(inSync) { }
|
||||
mSync(inSync),
|
||||
mAsync(inAsync) { }
|
||||
|
||||
void handleRequest(Int32 inRequest);
|
||||
void handleMethodToAddress();
|
||||
|
||||
@@ -42,8 +42,8 @@ enum TypeKind
|
||||
tkArray, // 4 no sometimes // Java arrays
|
||||
tkInterface // 4 no no // Java interfaces
|
||||
};
|
||||
const nPrimitiveTypeKinds = tkDouble + 1;
|
||||
const nTypeKinds = tkInterface + 1;
|
||||
const uint nPrimitiveTypeKinds = tkDouble + 1;
|
||||
const uint nTypeKinds = tkInterface + 1;
|
||||
|
||||
inline bool NS_EXTERN isPrimitiveKind(TypeKind tk) {return tk <= tkDouble;}
|
||||
inline bool NS_EXTERN isNonVoidPrimitiveKind(TypeKind tk) {return tk >= tkBoolean && tk <= tkDouble;}
|
||||
@@ -571,14 +571,14 @@ enum StandardClass {
|
||||
cString, // java.lang.String
|
||||
cInterruptedException // java.lang.InterruptedException
|
||||
};
|
||||
const nStandardClasses = cString + 1;
|
||||
const firstOrdinaryStandardClass = cThrowable;
|
||||
const uint nStandardClasses = cString + 1;
|
||||
const uint firstOrdinaryStandardClass = cThrowable;
|
||||
|
||||
// Standard interfaces
|
||||
enum StandardInterface {
|
||||
iCloneable // java.lang.Cloneable
|
||||
};
|
||||
const nStandardInterfaces = iCloneable + 1;
|
||||
const uint nStandardInterfaces = iCloneable + 1;
|
||||
|
||||
|
||||
// Standard objects
|
||||
@@ -592,7 +592,7 @@ enum StandardObject {
|
||||
oNullPointerException, // new java.lang.NullPointerException()
|
||||
oInterruptedException // new java.lang.InterruptedException()
|
||||
};
|
||||
const nStandardObjects = oNullPointerException + 1;
|
||||
const uint nStandardObjects = oNullPointerException + 1;
|
||||
|
||||
|
||||
class NS_EXTERN Standard
|
||||
|
||||
@@ -104,7 +104,7 @@ outputNodeTemplates($DataNodeTemplateFN, \@gPrimitiveInfo);
|
||||
unlink ($PrimitiveOperationsEnumFN) or break;
|
||||
$gLastPrimEnumName = outputEnumFromListX("PrimitiveOperation", $PrimitiveOperationsEnumFN, 0, \@gPrimitiveInfo, \&primInfoToEnumDescriptor);
|
||||
open FILE, ">>$PrimitiveOperationsEnumFN" or die "Couldn't open $PrimitiveOperationsEnumFN: $!\n";
|
||||
print FILE "\nconst nPrimitiveOperations = $gLastPrimEnumName + 1;\n";
|
||||
print FILE "\nconst uint nPrimitiveOperations = $gLastPrimEnumName + 1;\n";
|
||||
close FILE;
|
||||
|
||||
# now handle the BURG section of the file
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#ifdef DEBUG_LOG
|
||||
|
||||
const tabWidth = 0; // Width of tabs in output stream; 0 means no tabs
|
||||
const uint tabWidth = 0; // Width of tabs in output stream; 0 means no tabs
|
||||
|
||||
void printSpaces(LogModuleObject &f, int nSpaces);
|
||||
void printMargin(LogModuleObject &f, int margin);
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
~EventListener() { }
|
||||
virtual ~EventListener() { }
|
||||
|
||||
virtual void listenToMessage(BroadcastEventKind inKind, void* inArgument) = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user