compile with -Wunused-but-set-variable

Our open-source build compiles with these warnings, so they cause spew when building from github. And I think they are good to catch programmer error.
Esse commit está contido em:
Paul Tarjan
2013-06-03 19:50:24 -07:00
commit de Sara Golemon
commit b369aa91bc
4 arquivos alterados com 4 adições e 14 exclusões
+3 -1
Ver Arquivo
@@ -5419,7 +5419,9 @@ void genCodeForTrace(Trace* trace,
CodegenState state(irFactory, regs, live_regs, lifetime, asmInfo);
// Returns: whether a block has already been emitted.
auto isEmitted = [&](Block* block) { return state.addresses[block]; };
DEBUG_ONLY auto isEmitted = [&](Block* block) {
return state.addresses[block];
};
/*
* Emit the given block on the supplied assembler. The `nextBlock'
+1 -1
Ver Arquivo
@@ -321,7 +321,7 @@ PhysReg::Type LinearScan::getRegType(const SSATmp* tmp, int locIdx) const {
if (packed_tv) return PhysReg::GP;
Type tmpType = tmp->type();
DEBUG_ONLY Type tmpType = tmp->type();
uint32_t tmpId = tmp->id();
-4
Ver Arquivo
@@ -943,10 +943,6 @@ getDynLocType(const vector<DynLocation*>& inputs,
}
const bool setElem = mcodeMaybeArrayKey(ni->immVecM[0]);
const bool setNewElem = ni->immVecM[0] == MW;
const Type keyType =
setNewElem ? Type::None
: Type::fromRuntimeType(inputs[2]->rtt);
const Type valType = Type::fromRuntimeType(inputs[0]->rtt);
if (setElem && baseType.maybe(Type::Str)) {
if (baseType.isString()) {
-8
Ver Arquivo
@@ -182,14 +182,6 @@ void VectorEffects::init(Opcode op, const Type origBase,
}
}
// Setting an element with a base of one of these types will either succeed
// (with possible promotion) or fatal
const Type okBase = Type::Str | Type::Arr | Type::Obj;
// Setting an element with one of these types as the key will fail, issue a
// warning, and evaulate to null.
const Type badArrKey = Type::Arr | Type::Obj;
// The final baseType should be a pointer/box iff the input was
baseType = baseBoxed ? baseType.box() : baseType;
baseType = basePtr ? baseType.ptr() : baseType;