<p>Kévin Redon has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/14434">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">minor: don't redefine macros<br><br>the DEBUG macro name and ARRAY_SIZE macro function are frequently<br>used in other projects. If these projects also use libosmocore,<br>the macros will be redefined. This also generates a warning message<br>during compilation.<br>Not redefining the macros removes the warning message and possible<br>(but unlikely) mis-redefinition.<br><br>Change-Id: I0ba91eae8eacc5542d1647601b372e417ed1713c<br>---<br>M include/osmocom/core/logging.h<br>M include/osmocom/core/utils.h<br>2 files changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/14434/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h</span><br><span>index 295e5a8..803b4a9 100644</span><br><span>--- a/include/osmocom/core/logging.h</span><br><span>+++ b/include/osmocom/core/logging.h</span><br><span>@@ -16,7 +16,9 @@</span><br><span> /*! Maximum number of logging filters */</span><br><span> #define LOG_MAX_FILTERS   8</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef DEBUG</span><br><span> #define DEBUG</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> </span><br><span> #ifdef DEBUG</span><br><span> /*! Log a debug message through the Osmocom logging framework</span><br><span>diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h</span><br><span>index f27359c..8cf4afb 100644</span><br><span>--- a/include/osmocom/core/utils.h</span><br><span>+++ b/include/osmocom/core/utils.h</span><br><span>@@ -14,7 +14,9 @@</span><br><span>  * \file utils.h */</span><br><span> </span><br><span> /*! Determine number of elements in an array of static size */</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef ARRAY_SIZE</span><br><span> #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> /*! Return the maximum of two specified values */</span><br><span> #define OSMO_MAX(a, b) ((a) >= (b) ? (a) : (b))</span><br><span> /*! Return the minimum of two specified values */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/14434">change 14434</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/c/libosmocore/+/14434"/><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-Change-Id: I0ba91eae8eacc5542d1647601b372e417ed1713c </div>
<div style="display:none"> Gerrit-Change-Number: 14434 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kévin Redon <kredon@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>