[Nouveau] [PATCH 2/2] nv50/ir: fix a compiler warning with debug-only code
Tobias Klausmann
tobias.johannes.klausmann at mni.thm.de
Wed Jul 8 11:27:46 PDT 2015
codegen/nv50_ir_emit_nv50.cpp: In member function
‘void nv50_ir::CodeEmitterNV50::emitLOAD(const nv50_ir::Instruction*)’:
codegen/nv50_ir_emit_nv50.cpp:620:12: warning: unused variable ‘offset’
[-Wunused-variable]
int32_t offset = i->getSrc(0)->reg.data.offset;
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
index 67ea6df..86b16f2 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
@@ -616,8 +616,11 @@ CodeEmitterNV50::emitLoadStoreSizeCS(DataType ty)
void
CodeEmitterNV50::emitLOAD(const Instruction *i)
{
- DataFile sf = i->src(0).getFile();
+#ifdef DEBUG
int32_t offset = i->getSrc(0)->reg.data.offset;
+#endif
+
+ DataFile sf = i->src(0).getFile();
switch (sf) {
case FILE_SHADER_INPUT:
--
2.4.5
More information about the Nouveau
mailing list