[Mesa-dev] [PATCH mesa 2/6] nouveau: silence paranoid compiler's -Wclass-memaccess
Eric Engestrom
eric.engestrom at intel.com
Fri Sep 21 13:50:37 UTC 2018
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
---
src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 2 +-
src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
index 49425b98b9137058c986..62ebc2d24069b7b5f523 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
@@ -905,7 +905,7 @@ Instruction::isCommutationLegal(const Instruction *i) const
TexInstruction::TexInstruction(Function *fn, operation op)
: Instruction(fn, op, TYPE_F32)
{
- memset(&tex, 0, sizeof(tex));
+ memset(static_cast<void*>(&tex), 0, sizeof(tex));
tex.rIndirectSrc = -1;
tex.sIndirectSrc = -1;
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp
index 9193a01f189874a7fb38..b6b9b42964bec670079c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp
@@ -454,7 +454,7 @@ CodeEmitter::addInterp(int ipa, int reg, FixupApply apply)
if (!fixupInfo)
return false;
if (n == 0)
- memset(fixupInfo, 0, sizeof(FixupInfo));
+ memset(static_cast<void*>(fixupInfo), 0, sizeof(FixupInfo));
}
++fixupInfo->count;
--
Cheers,
Eric
More information about the mesa-dev
mailing list