Change in libosmocore[master]: ecu_fr: Avoid using deprecated symbols

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Dec 4 13:40:57 UTC 2019


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16473 )


Change subject: ecu_fr: Avoid using deprecated symbols
......................................................................

ecu_fr: Avoid using deprecated symbols

Avoid generating those annoying warnings during compilation:

ecu_fr.c: In function ‘ecu_fr_frame_in’:
ecu_fr.c:203:2: warning: ‘osmo_ecu_fr_reset’ is deprecated: Use generic ECU abstraction layer instead [-Wdeprecated-declarations]
  203 |  osmo_ecu_fr_reset(fr, frame);
      |  ^~~~~~~~~~~~~~~~~
ecu_fr.c:138:6: note: declared here
  138 | void osmo_ecu_fr_reset(struct osmo_ecu_fr_state *state, const uint8_t *frame)
      |      ^~~~~~~~~~~~~~~~~
ecu_fr.c: In function ‘ecu_fr_frame_out’:
ecu_fr.c:211:2: warning: ‘osmo_ecu_fr_conceal’ is deprecated: Use generic ECU abstraction layer instead [-Wdeprecated-declarations]
  211 |  if (osmo_ecu_fr_conceal(fr, frame_out) == 0)
      |  ^~
ecu_fr.c:172:5: note: declared here
  172 | int osmo_ecu_fr_conceal(struct osmo_ecu_fr_state *state, uint8_t *frame)
      |     ^~~~~~~~~~~~~~~~~~~

Change-Id: Idf84c2efbd3e71f07d3801feb8c5e48a1b4a136d
---
M src/codec/ecu_fr.c
1 file changed, 13 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/16473/1

diff --git a/src/codec/ecu_fr.c b/src/codec/ecu_fr.c
index 4545172..6e5aea8 100644
--- a/src/codec/ecu_fr.c
+++ b/src/codec/ecu_fr.c
@@ -130,11 +130,15 @@
  * \param[in] state The state object for the ECU
  * \param[out] frame The valid frame (GSM_FR_BYTES bytes in RTP payload format)
  */
-void osmo_ecu_fr_reset(struct osmo_ecu_fr_state *state, const uint8_t *frame)
+static void _osmo_ecu_fr_reset(struct osmo_ecu_fr_state *state, const uint8_t *frame)
 {
 	state->subsequent_lost_frame = false;
 	memcpy(state->frame_backup, frame, GSM_FR_BYTES);
 }
+void osmo_ecu_fr_reset(struct osmo_ecu_fr_state *state, const uint8_t *frame)
+{
+	_osmo_ecu_fr_reset(state, frame);
+}
 
 /*!
  * To be called when a bad frame is received.
@@ -144,7 +148,7 @@
  * \param[out] frame The buffer to fill with GSM_FR_BYTES of replacement frame
  * \returns 0 if the frame was sucessfully filled
  */
-int osmo_ecu_fr_conceal(struct osmo_ecu_fr_state *state, uint8_t *frame)
+static int _osmo_ecu_fr_conceal(struct osmo_ecu_fr_state *state, uint8_t *frame)
 {
 	int rc;
 
@@ -164,6 +168,11 @@
 
 	return 0;
 }
+/* legacy symbol */
+int osmo_ecu_fr_conceal(struct osmo_ecu_fr_state *state, uint8_t *frame)
+{
+	return _osmo_ecu_fr_conceal(state, frame);
+}
 
 /***********************************************************************
  * Integration with ECU core
@@ -191,7 +200,7 @@
 	if (bfi)
 		return 0;
 
-	osmo_ecu_fr_reset(fr, frame);
+	_osmo_ecu_fr_reset(fr, frame);
 	return 0;
 }
 
@@ -199,7 +208,7 @@
 {
 	struct osmo_ecu_fr_state *fr = (struct osmo_ecu_fr_state *) &st->data;
 
-	if (osmo_ecu_fr_conceal(fr, frame_out) == 0)
+	if (_osmo_ecu_fr_conceal(fr, frame_out) == 0)
 		return GSM_FR_BYTES;
 	else
 		return -1;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16473
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Idf84c2efbd3e71f07d3801feb8c5e48a1b4a136d
Gerrit-Change-Number: 16473
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191204/81955017/attachment.htm>


More information about the gerrit-log mailing list