<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7675">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core: Fix unused variable error in handle_show_sysinfo.<br><br>Apparently in OSX it's possible for OSX to HAVE_SYSCTL but not<br>HAVE_SYSINFO or HAVE_SWAPCTL. In this case freeswap caused an unused<br>variable error.<br><br>ASTERISK-26563 #close<br><br>Change-Id: I8ec5b1897b786cc1abaf62264aa75039eea05510<br>---<br>M main/asterisk.c<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/asterisk.c b/main/asterisk.c<br>index f8e31d5..01107e2 100644<br>--- a/main/asterisk.c<br>+++ b/main/asterisk.c<br>@@ -795,7 +795,9 @@<br> static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)<br> {<br> uint64_t physmem, freeram;<br>+#if defined(HAVE_SYSINFO) || defined(HAVE_SWAPCTL)<br> uint64_t freeswap = 0;<br>+#endif<br> int nprocs = 0;<br> long uptime = 0;<br> int totalswap = 0;<br>@@ -885,7 +887,7 @@<br> #if defined(HAVE_SYSINFO)<br> ast_cli(a->fd, " Buffer RAM: %" PRIu64 " KiB\n", ((uint64_t) sys_info.bufferram * sys_info.mem_unit) / 1024);<br> #endif<br>-#if defined(HAVE_SWAPCTL) || defined(HAVE_SYSINFO)<br>+#if defined(HAVE_SYSINFO) || defined(HAVE_SWAPCTL)<br> ast_cli(a->fd, " Total Swap Space: %d KiB\n", totalswap);<br> ast_cli(a->fd, " Free Swap Space: %" PRIu64 " KiB\n\n", freeswap);<br> #endif<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7675">change 7675</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.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.asterisk.org/7675"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I8ec5b1897b786cc1abaf62264aa75039eea05510 </div>
<div style="display:none"> Gerrit-Change-Number: 7675 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>