<p></p>
<p><b>@b4n</b> requested changes on this pull request.</p>

<p>OK, so it's a bug in cppckeck that gets operator priority wrong, right?  Because the code was right, <code>*array[i]</code> is <code>*(array[i])</code>, not <code>(*array)[i]</code>.</p>
<p>Anyway, I think there could be a better loop, and there's at least an issue with the <code>g_object_ref()</code> calls.</p><hr>

<p>In <a href="https://github.com/geany/geany-plugins/pull/1017#discussion_r507186430">debugger/src/tpage.c</a>:</p>
<pre style='color:#555'>>              {
-                       g_object_ref(*widgets[i]);
-                       gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(*widgets[i])), *widgets[i]);
+                       widget = widgets[i];
+                       g_object_ref(widget);
</pre>
<p>That's wrong, isn't it?  It should try to unref <code>*widget</code> I believe.</p>

<hr>

<p>In <a href="https://github.com/geany/geany-plugins/pull/1017#discussion_r507187037">debugger/src/tpage.c</a>:</p>
<pre style='color:#555'>>                      i++;
-               }
-               
+               } while (widget);
</pre>
<p>I'd rather see it as</p>
<div class="highlight highlight-source-c"><pre><span class="pl-k">for</span> (i = <span class="pl-c1">0</span>; widgets[i]; i++)
{
        GtkWidget **widget_ref = widgets[i];
        <span class="pl-c1">g_object_ref</span>(*widget_ref);
        <span class="pl-c1">gtk_container_remove</span>(…);
}</pre></div>
<p>It's more idiomatic and understandable to me than relying on the variable set in the loop.</p>

<hr>

<p>In <a href="https://github.com/geany/geany-plugins/pull/1017#discussion_r507187090">debugger/src/tpage.c</a>:</p>
<pre style='color:#555'>>                      g_object_unref(*widgets[i]);
                        i++;
-               }
+               } while (widget);
</pre>
<p>what's the point here?  You're not using the variable you set in the loop.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany-plugins/pull/1017#pullrequestreview-511162325">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2JVLFQYANRZSZY6CTSLMOSLANCNFSM4SUHYX2Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJZEUBYKF6HSUDRKULTSLMOSLA5CNFSM4SUHYX22YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODZ33PVI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany-plugins/pull/1017#pullrequestreview-511162325",
"url": "https://github.com/geany/geany-plugins/pull/1017#pullrequestreview-511162325",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>