From 93a720f81a32d501c5a9d47c063b2fee4ea8a325 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Tue, 4 Feb 2025 19:57:33 +0100 Subject: [PATCH] gfxstream: mark unused variables as such It's unclear to me whether this is dead code that should be removed or dead code that should be used, so I just marked it as unused to remove a few thousand warnings when compiling. Part-of: --- src/gfxstream/codegen/scripts/cereal/counting.py | 1 + src/gfxstream/codegen/scripts/cereal/marshaling.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gfxstream/codegen/scripts/cereal/counting.py b/src/gfxstream/codegen/scripts/cereal/counting.py index 08504fe0a98..2738f0d8bdd 100644 --- a/src/gfxstream/codegen/scripts/cereal/counting.py +++ b/src/gfxstream/codegen/scripts/cereal/counting.py @@ -78,6 +78,7 @@ class VulkanCountingCodegen(VulkanTypeIterator): makeVulkanTypeSimple(False, "uint64_t", 1, paramName=handle64Var) else: self.cgen.stmt("uint64_t %s" % handle64Var) + self.cgen.stmt("(void)%s" % handle64Var) handle64VarAccess = "&%s" % handle64Var handle64VarType = \ makeVulkanTypeSimple(False, "uint64_t", 0, paramName=handle64Var) diff --git a/src/gfxstream/codegen/scripts/cereal/marshaling.py b/src/gfxstream/codegen/scripts/cereal/marshaling.py index 800552ad901..01a41bbe9ee 100644 --- a/src/gfxstream/codegen/scripts/cereal/marshaling.py +++ b/src/gfxstream/codegen/scripts/cereal/marshaling.py @@ -195,6 +195,7 @@ class VulkanMarshalingCodegen(VulkanTypeIterator): checkName = "check_%s" % vulkanType.paramName self.cgen.stmt("%s %s" % ( self.cgen.makeCTypeDecl(vulkanType, useParamName = False), checkName)) + self.cgen.stmt("(void)%s" % checkName) checkAccess = checkName addrExpr = "&" + checkAccess sizeExpr = self.cgen.sizeofExpr(vulkanType)