From: Tina Müller Date: Thu, 28 Feb 2019 18:40:53 +0000 (+0100) Subject: Make declarations before other statements X-Git-Tag: upstream/0.2.2^2~4 X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/commitdiff_plain/1560fc82ad6f642553edacae9d99f192ed480221 Make declarations before other statements --- diff --git a/tests/run-dumper.c b/tests/run-dumper.c index 302b9b9..04c5bee 100644 --- a/tests/run-dumper.c +++ b/tests/run-dumper.c @@ -79,10 +79,12 @@ error: int compare_nodes(yaml_document_t *document1, int index1, yaml_document_t *document2, int index2, int level) { - if (level++ > 1000) return 0; - yaml_node_t *node1 = yaml_document_get_node(document1, index1); - yaml_node_t *node2 = yaml_document_get_node(document2, index2); int k; + yaml_node_t *node1; + yaml_node_t *node2; + if (level++ > 1000) return 0; + node1 = yaml_document_get_node(document1, index1); + node2 = yaml_document_get_node(document2, index2); assert(node1); assert(node2);