v2: Add preventative comment (Ilia Mirkin)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
CodeEmitterNV50::emitLOAD(const Instruction *i)
{
DataFile sf = i->src(0).getFile();
- int32_t offset = i->getSrc(0)->reg.data.offset;
+ MAYBE_UNUSED int32_t offset = i->getSrc(0)->reg.data.offset;
switch (sf) {
case FILE_SHADER_INPUT:
i->setSrc(1, def->getSrc(0));
} else {
ImmediateValue val;
- bool ret = def->src(0).getImmediate(val);
+ // getImmediate() has side-effects on the argument so this *shouldn't*
+ // be folded into the assert()
+ MAYBE_UNUSED bool ret = def->src(0).getImmediate(val);
assert(ret);
if (i->getSrc(1)->reg.data.id & 1)
val.reg.data.u32 >>= 16;