Add PUFFS_IGNORE_POTENTIALLY_UNUSED_VARIABLE.

This commit is contained in:
Nigel Tao committed 2017-09-22 12:00:14 +10:00
1 parent 18e32d61e5
commit fda696bf95
6 files changed
+16 -20

No files matched your search

+1 -2
View File
@@ -149,8 +149,7 @@ func (g *gen) writeSaveDerivedVar(b *buffer, name t.ID, typ *a.TypeExpr) error {
b.printf("}")
// Not all writer1 methods use the wend variable.
b.printf("\n/* Avoid the \"unused variable\" warning. */\n")
b.printf("(void)(%swend_%s);", bPrefix, nameStr)
b.printf("PUFFS_IGNORE_POTENTIALLY_UNUSED_VARIABLE(%swend_%s);", bPrefix, nameStr)
b.printf("}\n")
}