<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11095">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo-config-merge: Don't use C99 'for' loop initial declarations<br><br>The existing code passed gerrit build verification but failed the master<br>builds with the following error:<br><br>osmo-config-merge.c:148:4: error: 'for' loop initial declarations are only allowed in C99 or C11 mode<br>    for (int i = 0; i < cur_indent - indent; i++) {<br>    ^<br>osmo-config-merge.c:148:4: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your<br>code<br><br>Change-Id: Ia29e85b648c1a427be88242306634efe890e250d<br>---<br>M utils/osmo-config-merge.c<br>1 file changed, 4 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/95/11095/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/utils/osmo-config-merge.c b/utils/osmo-config-merge.c</span><br><span>index 131486c..3762c67 100644</span><br><span>--- a/utils/osmo-config-merge.c</span><br><span>+++ b/utils/osmo-config-merge.c</span><br><span>@@ -145,7 +145,8 @@</span><br><span>                   /* new child to last node */</span><br><span>                         n = node_alloc_child(last);</span><br><span>          } else if (indent < cur_indent) {</span><br><span style="color: hsl(0, 100%, 40%);">-                    for (int i = 0; i < cur_indent - indent; i++) {</span><br><span style="color: hsl(120, 100%, 40%);">+                    int i;</span><br><span style="color: hsl(120, 100%, 40%);">+                        for (i = 0; i < cur_indent - indent; i++) {</span><br><span>                               /* go to parent, add another sibling */</span><br><span>                              if (last->parent)</span><br><span>                                         last = last->parent;</span><br><span>@@ -202,7 +203,8 @@</span><br><span> </span><br><span>    if (root->line) {</span><br><span>                 if (print_node_depth) {</span><br><span style="color: hsl(0, 100%, 40%);">-                 for (int i = 0; i < level; i++)</span><br><span style="color: hsl(120, 100%, 40%);">+                    int i;</span><br><span style="color: hsl(120, 100%, 40%);">+                        for (i = 0; i < level; i++)</span><br><span>                               fputc('*', out);</span><br><span>             }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11095">change 11095</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11095"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ia29e85b648c1a427be88242306634efe890e250d </div>
<div style="display:none"> Gerrit-Change-Number: 11095 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>