mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Add PUFFS_IGNORE_POTENTIALLY_UNUSED_VARIABLE.
This commit is contained in:
1 parent
18e32d61e5
commit
fda696bf95
6 files changed
+16
-20
No files matched your search
@@ -199,8 +199,7 @@ func (g *gen) writeStatement(b *buffer, n *a.Node, depth uint32) error {
|
||||
|
||||
// TODO: remove this.
|
||||
if n.XType().Decorator().Key() == t.KeyColon {
|
||||
b.printf("\n/* Avoid the \"unused variable\" warning. */\n")
|
||||
b.printf("if (%s%s.ptr) {}\n", vPrefix, n.Name().String(g.tm))
|
||||
b.printf("PUFFS_IGNORE_POTENTIALLY_UNUSED_VARIABLE(%s%s);\n", vPrefix, n.Name().String(g.tm))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user