schema parser MAINTENANCE move variable used only in Debug build mode under ifndef NDEBUG
diff --git a/src/resolve.c b/src/resolve.c
index 5c3dada..117060c 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -7006,13 +7006,14 @@
                       struct lys_node *snode)
 {
     int rc, log_hidden;
-    uint32_t u;
     struct lyxml_elem *yin;
 
     assert(unres && item && ((type != UNRES_LEAFREF) && (type != UNRES_INSTID) && (type != UNRES_WHEN)
            && (type != UNRES_MUST)));
 
 #ifndef NDEBUG
+    uint32_t u;
+
     /* check for duplicities in unres */
     for (u = 0; u < unres->count; u++) {
         if (unres->type[u] == type && unres->item[u] == item &&