<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/14864">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core/defs.h: introduce and use OSMO_DEPRECATED_OUTSIDE<br><br>The new OSMO_DEPRECATED_OUTSIDE macro is similar to the existing<br>OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE, but allows to override the<br>deprecation message.<br><br>Let's use it to suspend deprecation warnings related to:<br><br>  - gsm48_decode_bcd_number(),<br>  - osmo_ecu_fr_conceal(),<br>  - osmo_ecu_fr_reset(),<br><br>as they're intentionally used in scope of the library.<br><br>Change-Id: I1b0eff1396776900c1286e41da3aee3ff78b326e<br>---<br>M include/osmocom/codec/ecu.h<br>M include/osmocom/core/defs.h<br>M include/osmocom/gsm/gsm48_ie.h<br>3 files changed, 7 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/codec/ecu.h b/include/osmocom/codec/ecu.h</span><br><span>index 99b1430..668df36 100644</span><br><span>--- a/include/osmocom/codec/ecu.h</span><br><span>+++ b/include/osmocom/codec/ecu.h</span><br><span>@@ -3,6 +3,7 @@</span><br><span> #include <stdint.h></span><br><span> #include <stdbool.h></span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/core/defs.h></span><br><span> #include <osmocom/codec/codec.h></span><br><span> </span><br><span> /* ECU state for GSM-FR */</span><br><span>@@ -12,9 +13,9 @@</span><br><span> };</span><br><span> </span><br><span> void osmo_ecu_fr_reset(struct osmo_ecu_fr_state *state, const uint8_t *frame)</span><br><span style="color: hsl(0, 100%, 40%);">-      OSMO_DEPRECATED("Use generic ECU abstraction layer instead");</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_DEPRECATED_OUTSIDE("Use generic ECU abstraction layer instead");</span><br><span> int osmo_ecu_fr_conceal(struct osmo_ecu_fr_state *state, uint8_t *frame)</span><br><span style="color: hsl(0, 100%, 40%);">-     OSMO_DEPRECATED("Use generic ECU abstraction layer instead");</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_DEPRECATED_OUTSIDE("Use generic ECU abstraction layer instead");</span><br><span> </span><br><span> enum osmo_ecu_codec {</span><br><span>         OSMO_ECU_CODEC_HR,</span><br><span>diff --git a/include/osmocom/core/defs.h b/include/osmocom/core/defs.h</span><br><span>index 5e5aa90..33ffb7b 100644</span><br><span>--- a/include/osmocom/core/defs.h</span><br><span>+++ b/include/osmocom/core/defs.h</span><br><span>@@ -43,8 +43,10 @@</span><br><span> </span><br><span> #if BUILDING_LIBOSMOCORE</span><br><span> # define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE</span><br><span style="color: hsl(120, 100%, 40%);">+# define OSMO_DEPRECATED_OUTSIDE(text)</span><br><span> #else</span><br><span> # define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE OSMO_DEPRECATED("For internal use inside libosmocore only.")</span><br><span style="color: hsl(120, 100%, 40%);">+# define OSMO_DEPRECATED_OUTSIDE(text) OSMO_DEPRECATED(text)</span><br><span> #endif</span><br><span> </span><br><span> #undef _OSMO_HAS_ATTRIBUTE_DEPRECATED_WITH_MESSAGE</span><br><span>diff --git a/include/osmocom/gsm/gsm48_ie.h b/include/osmocom/gsm/gsm48_ie.h</span><br><span>index 71050df..339aa13 100644</span><br><span>--- a/include/osmocom/gsm/gsm48_ie.h</span><br><span>+++ b/include/osmocom/gsm/gsm48_ie.h</span><br><span>@@ -7,6 +7,7 @@</span><br><span> #include <errno.h></span><br><span> </span><br><span> #include <osmocom/core/msgb.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/core/defs.h></span><br><span> #include <osmocom/gsm/tlv.h></span><br><span> #include <osmocom/gsm/mncc.h></span><br><span> #include <osmocom/gsm/protocol/gsm_04_08.h></span><br><span>@@ -14,7 +15,7 @@</span><br><span> /* decode a 'called/calling/connect party BCD number' as in 10.5.4.7 */</span><br><span> int gsm48_decode_bcd_number(char *output, int output_len,</span><br><span>                            const uint8_t *bcd_lv, int h_len)</span><br><span style="color: hsl(0, 100%, 40%);">-   OSMO_DEPRECATED("Use gsm48_decode_bcd_number2() for improved bounds checking");</span><br><span style="color: hsl(120, 100%, 40%);">+     OSMO_DEPRECATED_OUTSIDE("Use gsm48_decode_bcd_number2() for improved bounds checking");</span><br><span> int gsm48_decode_bcd_number2(char *output, size_t output_len,</span><br><span>                        const uint8_t *bcd_lv, size_t input_len,</span><br><span>                             size_t h_len);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/14864">change 14864</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/+/14864"/><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: I1b0eff1396776900c1286e41da3aee3ff78b326e </div>
<div style="display:none"> Gerrit-Change-Number: 14864 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>