diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py
index 069327bc8be07b7ed8d8187cd9caaf3045aeaafa..b81ccb824f1cf5775184006a159f4ace4ff84225 100644
--- a/Cython/Compiler/Nodes.py
+++ b/Cython/Compiler/Nodes.py
@@ -4095,6 +4095,9 @@ class GeneratorBodyDefNode(DefNode):
                 lenv.scope_class.type.declaration_code(Naming.cur_scope_cname),
                 lenv.scope_class.type.cast_code('%s->closure' %
                                                 Naming.generator_cname)))
+            # FIXME: this silences a potential "unused" warning => try to avoid unused closures in more cases
+            code.putln("if (1); else %s = %s;" % (
+                Naming.cur_scope_cname, Naming.cur_scope_cname))
 
         code.mark_pos(self.pos)
         code.putln("")